Removed code for resetting MAC address 97/128897/1
authorSeonah Moon <seonah1.moon@samsung.com>
Fri, 12 May 2017 04:14:28 +0000 (13:14 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Fri, 12 May 2017 04:14:39 +0000 (13:14 +0900)
Change-Id: Ieac39e6d460d8baca7b596c8886a13f7fd21a630
Signed-off-by: Seonah Moon <seonah1.moon@samsung.com>
include/tethering_private.h
packaging/capi-network-tethering.spec
src/tethering.c
test/tethering_test.c

index bab9c79..a1f3dff 100644 (file)
@@ -290,7 +290,6 @@ typedef struct {
        bool port_forwarding;
        bool port_filtering;
        bool dhcp_enabled;
-       bool change_mac;
        int channel;
        int wifi_max_connected;
 } __tethering_h;
index 924c0f4..fde2a89 100644 (file)
@@ -1,6 +1,6 @@
 Name:          capi-network-tethering
 Summary:       Tethering Framework
-Version:       1.0.48
+Version:       1.0.49
 Release:       1
 Group:         System/Network
 License:       Apache-2.0
index 4aa65b9..8da8e0d 100755 (executable)
@@ -1383,7 +1383,6 @@ API int tethering_create(tethering_h *tethering)
        th->channel = 6;
        th->mode_type = TETHERING_WIFI_MODE_TYPE_G;
        th->wifi_max_connected = TETHERING_WIFI_MAX_STA;
-       th->change_mac = false;
 
        if (__generate_initial_passphrase(th->passphrase,
                        sizeof(th->passphrase)) == 0) {
@@ -1457,17 +1456,10 @@ API int tethering_destroy(tethering_h tethering)
        _retvm_if(tethering == NULL, TETHERING_ERROR_INVALID_PARAMETER,
                        "parameter(tethering) is NULL\n");
 
-       GVariant *result = NULL;
        __tethering_h *th = (__tethering_h *)tethering;
 
        INFO("Tethering Handle : 0x%X\n", th);
 
-       if (th->change_mac) {
-               result = g_dbus_proxy_call_sync(th->client_bus_proxy, "reset_mac", NULL,
-                               G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
-               g_variant_unref(result);
-       }
-
        __disconnect_signals(tethering);
 
        if (th->ssid)
@@ -3663,10 +3655,10 @@ API int tethering_wifi_change_mac(tethering_h tethering, char *mac)
        }
 
        g_variant_get(parameters, "(u)", &result);
-
        g_variant_unref(parameters);
 
-       th->change_mac = true;
+       if (result == MOBILE_AP_ERROR_NOT_PERMITTED)
+               return TETHERING_ERROR_NOT_SUPPORT_API;
 
        return TETHERING_ERROR_NONE;
 }
index a6880d7..ab65cda 100755 (executable)
@@ -76,6 +76,10 @@ static bool __is_err(tethering_error_e ret)
                err_msg = "Operation is not permitted";
                break;
 
+       case TETHERING_ERROR_NOT_SUPPORT_API:
+               err_msg = "Not supported";
+               break;
+
        default:
                err_msg = "This should not be happened";
                break;