From 6da4fc2ea6a5e012b9bfb09774313cb6a1c73c96 Mon Sep 17 00:00:00 2001 From: Danny Jeongseok Seo Date: Thu, 19 Jul 2012 13:34:16 +0900 Subject: [PATCH] Fix Wi-Fi power state update --- debian/changelog | 8 ++++++++ packaging/net-config.spec | 2 +- src/wifi-power.c | 16 +++++++++------- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/debian/changelog b/debian/changelog index 308e9f7..f248412 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Wed, 30 May 2012 13:34:17 +0900 + net-config (0.1.83) unstable; urgency=low * Revise emulator support diff --git a/packaging/net-config.spec b/packaging/net-config.spec index a72d288..8ce69bc 100644 --- a/packaging/net-config.spec +++ b/packaging/net-config.spec @@ -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 diff --git a/src/wifi-power.c b/src/wifi-power.c index 511fd7c..5dd06ad 100644 --- a/src/wifi-power.c +++ b/src/wifi-power.c @@ -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, -- 2.7.4