From: Samuel Ortiz Date: Wed, 22 Sep 2010 14:49:45 +0000 (+0200) Subject: Schedule delayed scan when being disconnected from an AP X-Git-Tag: 0.62~41 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dd16bc7188bb62028efdc82f56f04f9760c086b4;p=platform%2Fupstream%2Fconnman.git 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 --- diff --git a/plugins/supplicant.c b/plugins/supplicant.c index a81eb04..d0357f3 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;