Fix Wi-Fi power state update
authorDanny Jeongseok Seo <S.Seo@samsung.com>
Thu, 19 Jul 2012 04:34:16 +0000 (13:34 +0900)
committerDanny Jeongseok Seo <S.Seo@samsung.com>
Thu, 19 Jul 2012 04:34:16 +0000 (13:34 +0900)
debian/changelog
packaging/net-config.spec
src/wifi-power.c

index 308e9f7..f248412 100644 (file)
@@ -1,3 +1,11 @@
+net-config (0.1.84-1) unstable; urgency=low
+
+  * Fix Wi-Fi power state update
+  * Git: slp/pkgs/n/net-config
+  * Tag: net-config_0.1.84-1
+
+ -- Danny Jeongseok Seo <s.seo@samsung.com>  Wed, 30 May 2012 13:34:17 +0900
+
 net-config (0.1.83) unstable; urgency=low
 
   * Revise emulator support
index a72d288..8ce69bc 100644 (file)
@@ -2,7 +2,7 @@
 
 Name:       net-config
 Summary:    TIZEN Network Configuration Module
-Version:    0.1.83
+Version:    0.1.84_1
 Release:    1
 Group:      System/Network
 License:    Apache License Version 2.0
index 511fd7c..5dd06ad 100644 (file)
@@ -227,7 +227,7 @@ static gboolean __netconfig_wifi_load_driver(void)
 
        rv = netconfig_execute_file(path, args, envs);
        if (rv != TRUE) {
-               DBG("failed to load wireless device driver");
+               DBG("Failed to load wireless device driver");
                return FALSE;
        }
 
@@ -247,7 +247,7 @@ static gboolean __netconfig_wifi_remove_driver(void)
 
        rv = netconfig_execute_file(path, args, env);
        if (rv != TRUE) {
-               DBG("failed to remove(unload) driver for wireless device");
+               DBG("Failed to remove(unload) driver for wireless device");
                return FALSE;
        }
 
@@ -362,17 +362,19 @@ static gboolean __netconfig_wifi_try_to_remove_driver(void)
                }
 
                if (g_str_equal(wifi_tech_state, "EnabledTechnologies") != TRUE) {
-                       netconfig_wifi_update_power_state(FALSE);
-
-                       return __netconfig_wifi_remove_driver();
+                       g_free(wifi_tech_state);
+                       break;
                }
 
                g_free(wifi_tech_state);
+       }
 
-               wifi_tech_state = NULL;
+       if (__netconfig_wifi_remove_driver() == TRUE) {
+               netconfig_wifi_update_power_state(FALSE);
+               return TRUE;
        }
 
-       return __netconfig_wifi_remove_driver();
+       return FALSE;
 }
 
 static void __netconfig_wifi_airplane_mode(keynode_t* node,