From be00d6d2714b762a43bdcac89e920222d00499de Mon Sep 17 00:00:00 2001 From: Samuel Ortiz Date: Thu, 30 Sep 2010 16:39:41 +0200 Subject: [PATCH] supplicant: No need for actively remove network upon disconnection When being disconnected, ConnMan should just wait for wpa_supplicant scan results instead of trying to be smart about if the disconnected AP is still around or not. wpa_supplicant will try to roam and run periodic scan for that purpose. If the AP is missing after 2 scans, it's removed from the list, and ConnMan then removes it from the enabled networks. Fixes BMC#7730 BMC#7734 --- plugins/supplicant.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/plugins/supplicant.c b/plugins/supplicant.c index dc8444a..115d2c8 100644 --- a/plugins/supplicant.c +++ b/plugins/supplicant.c @@ -2229,15 +2229,6 @@ static void scanning(struct supplicant_task *task, DBusMessage *msg) task->scanning = TRUE; } -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; @@ -2338,13 +2329,7 @@ static void state_change(struct supplicant_task *task, DBusMessage *msg) task_connect(task); } else task->network = NULL; - } else { - if (task->state == WPA_DISCONNECTED) - g_timeout_add_seconds(10, delayed_scan, task); - - remove_network(task); } - break; default: -- 2.7.4