diff options
-rwxr-xr-x | include/technology.h | 4 | ||||
-rwxr-xr-x | plugins/wifi.c | 12 | ||||
-rwxr-xr-x | src/technology.c | 13 |
3 files changed, 20 insertions, 9 deletions
diff --git a/include/technology.h b/include/technology.h index 8efe9e74..12bb64c2 100755 --- a/include/technology.h +++ b/include/technology.h @@ -71,6 +71,10 @@ struct connman_technology_driver { int connman_technology_driver_register(struct connman_technology_driver *driver); void connman_technology_driver_unregister(struct connman_technology_driver *driver); +#if defined TIZEN_EXT +void connman_technology_set_allow_scandone_signal(bool flag); +#endif + #ifdef __cplusplus } #endif diff --git a/plugins/wifi.c b/plugins/wifi.c index 76a1d7a0..562c9b7c 100755 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@ -1183,11 +1183,8 @@ static int throw_wifi_scan(struct connman_device *device, if (wifi->tethering) return -EBUSY; -#if defined TIZEN_EXT - if (connman_device_get_scanning(device) && !wifi->allow_full_scan) -#else + if (connman_device_get_scanning(device)) -#endif return -EALREADY; connman_device_ref(device); @@ -1301,11 +1298,8 @@ static void scan_callback(int result, GSupplicantInterface *interface, } scanning = connman_device_get_scanning(device); -#if defined TIZEN_EXT - if (scanning && wifi && !wifi->allow_full_scan) -#else + if (scanning) -#endif connman_device_set_scanning(device, CONNMAN_SERVICE_TYPE_WIFI, false); @@ -1330,6 +1324,7 @@ static void scan_callback(int result, GSupplicantInterface *interface, DBG("Trigger Full Channel Scan"); throw_wifi_scan(device, scan_callback); wifi->allow_full_scan = FALSE; + connman_technology_set_allow_scandone_signal(TRUE); } if (wifi && wifi->scan_pending_network && result != -EIO) { network_connect(wifi->scan_pending_network); @@ -1946,6 +1941,7 @@ static int wifi_scan(enum connman_service_type type, backgroung Scan feature.Tizen has added the BG Scan feature in net-config To sync with up ConnMan, we need to issue the Full Scan after SSID specific scan.*/ wifi->allow_full_scan = TRUE; + connman_technology_set_allow_scandone_signal(FALSE); #endif reset_autoscan(device); diff --git a/src/technology.c b/src/technology.c index d5d4a408..4e9cd9e8 100755 --- a/src/technology.c +++ b/src/technology.c @@ -43,6 +43,10 @@ static GHashTable *rfkill_list; static bool global_offlinemode; +#if defined TIZEN_EXT +static bool allow_scandone_signal = TRUE; +#endif + struct connman_rfkill { unsigned int index; enum connman_service_type type; @@ -1036,6 +1040,13 @@ void __connman_technology_scan_started(struct connman_device *device) DBG("device %p", device); } +#if defined TIZEN_EXT +void connman_technology_set_allow_scandone_signal(bool flag) +{ + allow_scandone_signal = flag; +} +#endif + void __connman_technology_scan_stopped(struct connman_device *device, enum connman_service_type type) { @@ -1064,7 +1075,7 @@ void __connman_technology_scan_stopped(struct connman_device *device, } #if defined TIZEN_EXT - if (count == 0) { + if (count == 0 && allow_scandone_signal) { DBusMessage *signal; signal = dbus_message_new_signal(CONNMAN_MANAGER_PATH, |