Call remove_network() on unsolicited disconnect
authorLucio Maciel <lucio.maciel@hp.com>
Tue, 21 Sep 2010 15:20:40 +0000 (17:20 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Tue, 21 Sep 2010 15:20:40 +0000 (17:20 +0200)
When receiving an unsolicited disconnect (turn-off the AP)
wpa_supplicant starts scanning every 5 seconds looking for the
previously connected ssid.

This causes the grow of the network list since connman will
not remove the unavailable networks if it is not the initiator of
the scan.

plugins/supplicant.c

index 6bfcd45..a81eb04 100644 (file)
@@ -2319,7 +2319,9 @@ static void state_change(struct supplicant_task *task, DBusMessage *msg)
                                task_connect(task);
                        } else
                                task->network = NULL;
-               }
+               } else
+                       remove_network(task);
+
                break;
 
        default: