diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2010-09-22 16:49:45 +0200 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2010-09-22 16:53:52 +0200 |
commit | dd16bc7188bb62028efdc82f56f04f9760c086b4 (patch) | |
tree | 4c2966467429c5f5c31acbc85118fc2827edaf7b /plugins | |
parent | ceee07de9cc82211c54168d3c0df7a69b1ab2398 (diff) | |
download | connman-dd16bc7188bb62028efdc82f56f04f9760c086b4.tar.gz connman-dd16bc7188bb62028efdc82f56f04f9760c086b4.tar.bz2 connman-dd16bc7188bb62028efdc82f56f04f9760c086b4.zip |
Schedule delayed scan when being disconnected from an AP
When being disconnected from an AP, a delayed scan is scheduled to make
sure the AP is still there. wpa_supplicant removes a BSS from its bss list
when it disappears from the scan results twice in a row.
Fixes BCM #6831
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/supplicant.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/plugins/supplicant.c b/plugins/supplicant.c index a81eb045..d0357f33 100644 --- a/plugins/supplicant.c +++ b/plugins/supplicant.c @@ -2226,6 +2226,15 @@ static void scanning(struct supplicant_task *task, DBusMessage *msg) scanning == TRUE ? "started" : "finished"); } +static gboolean delayed_scan(gpointer user_data) +{ + struct supplicant_task *task = user_data; + + supplicant_scan(task->device); + + return FALSE; +} + static void state_change(struct supplicant_task *task, DBusMessage *msg) { DBusError error; @@ -2319,8 +2328,12 @@ static void state_change(struct supplicant_task *task, DBusMessage *msg) task_connect(task); } else task->network = NULL; - } else + } else { + if (task->state == WPA_DISCONNECTED) + g_timeout_add_seconds(10, delayed_scan, task); + remove_network(task); + } break; |