From: Seonah Moon Date: Fri, 12 May 2017 04:14:28 +0000 (+0900) Subject: Removed code for resetting MAC address X-Git-Tag: accepted/tizen/unified/20170602.154213~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=95865828b155df487cb311fd8a6fe9ca3c3c6aff;p=platform%2Fcore%2Fapi%2Ftethering.git Removed code for resetting MAC address Change-Id: Ieac39e6d460d8baca7b596c8886a13f7fd21a630 Signed-off-by: Seonah Moon --- diff --git a/include/tethering_private.h b/include/tethering_private.h index bab9c79..a1f3dff 100644 --- a/include/tethering_private.h +++ b/include/tethering_private.h @@ -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; diff --git a/packaging/capi-network-tethering.spec b/packaging/capi-network-tethering.spec index 924c0f4..fde2a89 100644 --- a/packaging/capi-network-tethering.spec +++ b/packaging/capi-network-tethering.spec @@ -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 diff --git a/src/tethering.c b/src/tethering.c index 4aa65b9..8da8e0d 100755 --- a/src/tethering.c +++ b/src/tethering.c @@ -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; } diff --git a/test/tethering_test.c b/test/tethering_test.c index a6880d7..ab65cda 100755 --- a/test/tethering_test.c +++ b/test/tethering_test.c @@ -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;