Fixed g_variant_unref problem when set auto connect & Modified the routine to get... 33/171033/3
authortaesub kim <taesub.kim@samsung.com>
Mon, 26 Feb 2018 05:16:15 +0000 (14:16 +0900)
committertaesub kim <taesub.kim@samsung.com>
Mon, 26 Feb 2018 05:36:48 +0000 (14:36 +0900)
Change-Id: I0d714e0714b8bb7b2d54ea750178306849d6dd5e
Signed-off-by: Taesub Kim <taesub.kim@samsung.com>
src/network_dbus.c
src/network_interface.c

index b5a19c75d43cbce78fa20ed6c4de3930f5070be7..aeeda67f1cf72b19dc4446f142fce644e2de6c0f 100755 (executable)
@@ -2292,8 +2292,6 @@ int _net_dbus_set_auto_connect_mode(int connect_mode)
                        "SetProperty", params, 6 * DBUS_REPLY_TIMEOUT,
                        __net_set_auto_connect_reply);
 
-       g_variant_unref(param0);
-
        __NETWORK_FUNC_EXIT__;
        return Error;
 }
@@ -2318,13 +2316,11 @@ int _net_dbus_wifi_set_autoconnect(const char *profile_name, gboolean autoconnec
                        "SetProperty", params, &Error);
        if (message == NULL) {
                WIFI_LOG(WIFI_ERROR, "Failed to Set AutoConnect");
-               g_variant_unref(param0);
                __NETWORK_FUNC_EXIT__;
                return Error;
        }
 
        g_variant_unref(message);
-       g_variant_unref(param0);
 
        __NETWORK_FUNC_EXIT__;
        return Error;
index 79fabc3ade08a0c958273c0084b60373d2e35fba..0532e9eff63e3936d37a079ad6cb755a9ca82410 100755 (executable)
@@ -3454,14 +3454,6 @@ int net_wifi_get_autoscan(gboolean *autoscan)
                return NET_ERR_APP_NOT_REGISTERED;
        }
 
-       if (NetworkInfo.wifi_state == WIFI_OFF) {
-               if ((NetworkInfo.wifi_state = _net_get_wifi_state(&Error)) == WIFI_OFF) {
-                       WIFI_LOG(WIFI_ERROR, "Wi-Fi is powered off!");
-                       __NETWORK_FUNC_EXIT__;
-                       return NET_ERR_INVALID_OPERATION;
-               }
-       }
-
        if (_net_dbus_is_pending_call_used() == TRUE) {
                WIFI_LOG(WIFI_ERROR, "pending call in progress");
                __NETWORK_FUNC_EXIT__;
@@ -3491,14 +3483,6 @@ int net_wifi_get_autoscanmode(unsigned int *autoscanmode)
                return NET_ERR_APP_NOT_REGISTERED;
        }
 
-       if (NetworkInfo.wifi_state == WIFI_OFF) {
-               if ((NetworkInfo.wifi_state = _net_get_wifi_state(&Error)) == WIFI_OFF) {
-                       WIFI_LOG(WIFI_ERROR, "Wi-Fi is powered off!");
-                       __NETWORK_FUNC_EXIT__;
-                       return NET_ERR_INVALID_OPERATION;
-               }
-       }
-
        if (_net_dbus_is_pending_call_used() == TRUE) {
                WIFI_LOG(WIFI_ERROR, "pending call in progress");
                __NETWORK_FUNC_EXIT__;