Added handling when Wifi power was off
authorsunil85.kim <sunil85.kim@samsung.com>
Mon, 15 Apr 2013 11:52:41 +0000 (20:52 +0900)
committersunil85.kim <sunil85.kim@samsung.com>
Mon, 15 Apr 2013 11:52:41 +0000 (20:52 +0900)
debian/changelog
packaging/wifi-efl-ug.spec
sources/ui-gadget/wifi-efl-UG.c

index d86746b..15b3b9e 100644 (file)
@@ -1,3 +1,19 @@
+wifi-efl-ug (0.5.2-8) precise; urgency=low
+
+  * Added handling when Wifi power was off
+  * Git: magnolia/apps/home/ug-wifi-efl
+  * Tag: wifi-efl-ug_0.5.2-8
+
+ -- sunil85.kim <isurit@sunil85.kim>  Mon, 15 Apr 2013 20:48:31 +0900
+
+wifi-efl-ug (0.5.2-7) precise; urgency=low
+
+  * Added handling when Wifi power was off
+  * Git: magnolia/apps/home/ug-wifi-efl
+  * Tag: wifi-efl-ug_0.5.2-7
+
+ -- sunil85.kim <isurit@sunil85.kim>  Mon, 15 Apr 2013 20:26:36 +0900
+
 wifi-efl-ug (0.5.2-6) precise; urgency=low
 
   * Initialized rotate status value.
index 15c52a6..1c69678 100644 (file)
@@ -1,6 +1,6 @@
 Name:       wifi-efl-ug
 Summary:    Wi-Fi UI Gadget
-Version:    0.5.2_7
+Version:    0.5.2_8
 Release:    1
 Group:      App/Network
 License:    Flora License
index 563bc95..7969912 100644 (file)
@@ -466,6 +466,7 @@ UG_MODULE_API int setting_plugin_reset(bundle *data, void *priv)
        __COMMON_FUNC_ENTER__;
 
        int return_value = 0;
+       bool activated = false;
 
        return_value = wlan_manager_start();
        if (return_value != WLAN_MANAGER_ERR_NONE) {
@@ -475,13 +476,25 @@ UG_MODULE_API int setting_plugin_reset(bundle *data, void *priv)
        }
 
        wifi_foreach_found_aps(setting_plugin_wifi_found_ap_cb, NULL);
-       return_value = wlan_manager_power_off();
-       if (return_value != WLAN_MANAGER_ERR_NONE) {
-               ERROR_LOG(UG_NAME_NORMAL, "Failed to power_off: %d",return_value);
+
+       return_value = wifi_is_activated(&activated);
+       if (WIFI_ERROR_NONE == return_value)
+               INFO_LOG(UG_NAME_NORMAL, "Wi-Fi activated: %d", activated);
+       else {
+               ERROR_LOG(UG_NAME_NORMAL, "Failed to check state : %d",return_value);
                return_value = -1;
                goto error;
        }
 
+       if (activated != 0) {
+               return_value = wlan_manager_power_off();
+               if (return_value != WLAN_MANAGER_ERR_NONE) {
+                       ERROR_LOG(UG_NAME_NORMAL, "Failed to power_off: %d",return_value);
+                       return_value = -1;
+                       goto error;
+               }
+       }
+
        common_util_set_system_registry(VCONFKEY_WIFI_ENABLE_QS,
                                                                        VCONFKEY_WIFI_QS_ENABLE);