diff options
author | Patrik Flykt <patrik.flykt@linux.intel.com> | 2012-06-15 14:13:49 +0300 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2012-06-18 10:59:36 +0300 |
commit | 091f5fa9229897a52424cd442b325f97d361dbc3 (patch) | |
tree | a278048ff53f9721af75bf61689846c560c388d4 /gsupplicant | |
parent | 12c4d5c3b438d12c6ec60524edb474fb8312c0c6 (diff) | |
download | connman-091f5fa9229897a52424cd442b325f97d361dbc3.tar.gz connman-091f5fa9229897a52424cd442b325f97d361dbc3.tar.bz2 connman-091f5fa9229897a52424cd442b325f97d361dbc3.zip |
supplicant: Call scan callback if needed when removing interface
Check whether a scan callback is set for the interface when
an interface removed signal is received from wpa_supplicant.
wpa_supplicant seems not to reply to any outstanding scan method
calls after a wpa_supplicant 'RemoveInterface' has been received.
Diffstat (limited to 'gsupplicant')
-rw-r--r-- | gsupplicant/supplicant.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c index decf5fae..1a102912 100644 --- a/gsupplicant/supplicant.c +++ b/gsupplicant/supplicant.c @@ -437,6 +437,21 @@ static void remove_interface(gpointer data) g_hash_table_destroy(interface->net_mapping); g_hash_table_destroy(interface->network_table); + if (interface->scan_callback != NULL) { + SUPPLICANT_DBG("call interface %p callback %p scanning %d", + interface, interface->scan_callback, + interface->scanning); + + interface->scan_callback(-EIO, interface, interface->scan_data); + interface->scan_callback = NULL; + interface->scan_data = NULL; + + if (interface->scanning == TRUE) { + interface->scanning = FALSE; + callback_scan_finished(interface); + } + } + callback_interface_removed(interface); g_free(interface->wps_cred.key); |