From 725f284f189b65add52714c2d2d72f391433d8d1 Mon Sep 17 00:00:00 2001 From: "sunil85.kim" Date: Mon, 15 Apr 2013 20:52:41 +0900 Subject: [PATCH] Added handling when Wifi power was off --- debian/changelog | 16 ++++++++++++++++ packaging/wifi-efl-ug.spec | 2 +- sources/ui-gadget/wifi-efl-UG.c | 19 ++++++++++++++++--- 3 files changed, 33 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index d86746b..15b3b9e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 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 Mon, 15 Apr 2013 20:26:36 +0900 + wifi-efl-ug (0.5.2-6) precise; urgency=low * Initialized rotate status value. diff --git a/packaging/wifi-efl-ug.spec b/packaging/wifi-efl-ug.spec index 15c52a6..1c69678 100644 --- a/packaging/wifi-efl-ug.spec +++ b/packaging/wifi-efl-ug.spec @@ -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 diff --git a/sources/ui-gadget/wifi-efl-UG.c b/sources/ui-gadget/wifi-efl-UG.c index 563bc95..7969912 100644 --- a/sources/ui-gadget/wifi-efl-UG.c +++ b/sources/ui-gadget/wifi-efl-UG.c @@ -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); -- 2.7.4