From: Liu, Guoqiang Date: Mon, 1 Apr 2013 07:35:59 +0000 (+0800) Subject: Tethering: Do not trigger scan event when turning on Wi-Fi tethering X-Git-Tag: accepted/tizen/20130912.103241~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F71%2F5671%2F1;p=platform%2Fcore%2Fconnectivity%2Fnet-config.git Tethering: Do not trigger scan event when turning on Wi-Fi tethering Two signals received when turning on Wi-Fi tethering: "Powered on" and "Tethering on", do not trigger scan event when received the Wi-Fi "Powered on" signal in this case. Signed-off-by: Liu, Guoqiang --- diff --git a/src/wifi-background-scan.c b/src/wifi-background-scan.c index 46e98e2..a53628a 100644 --- a/src/wifi-background-scan.c +++ b/src/wifi-background-scan.c @@ -153,10 +153,18 @@ static gboolean __netconfig_wifi_bgscan_request_scan(gpointer data) { struct bgscan_timer_data *timer = (struct bgscan_timer_data *)data; int pm_state = VCONFKEY_PM_STATE_NORMAL; + int hotspot_wifi_state = VCONFKEY_MOBILE_HOTSPOT_WIFI_OFF; if (timer == NULL) return FALSE; + /* If Wi-Fi tethering is pending on, don't trigger scan event*/ + vconf_get_int(VCONFKEY_MOBILE_HOTSPOT_WIFI_STATE, &hotspot_wifi_state); + if (hotspot_wifi_state == VCONFKEY_MOBILE_HOTSPOT_WIFI_PENDING_ON) { + DBG("hotspot_wifi_state %d", hotspot_wifi_state); + return TRUE; + } + /* In case of LCD off, we don't need Wi-Fi scan */ vconf_get_int(VCONFKEY_PM_STATE, &pm_state); if (pm_state >= VCONFKEY_PM_STATE_LCDOFF)