supplicant: No need for actively remove network upon disconnection
authorSamuel Ortiz <sameo@linux.intel.com>
Thu, 30 Sep 2010 14:39:41 +0000 (16:39 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Thu, 30 Sep 2010 14:43:12 +0000 (16:43 +0200)
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

index dc8444a..115d2c8 100644 (file)
@@ -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: