summaryrefslogtreecommitdiff
path: root/plugins/supplicant.c
diff options
context:
space:
mode:
authorSam Leffler <sleffler@google.com>2009-11-30 18:33:52 +0100
committerMarcel Holtmann <marcel@holtmann.org>2009-11-30 18:36:31 +0100
commit83bab160484da934e9060cb1cac5215efb0e5269 (patch)
treeae9ff0a2b18392587b949edd5c5b4c49d7256a7d /plugins/supplicant.c
parent322c62bff4462c38c6643e9850847afd4c671c08 (diff)
downloadconnman-83bab160484da934e9060cb1cac5215efb0e5269.tar.gz
connman-83bab160484da934e9060cb1cac5215efb0e5269.tar.bz2
connman-83bab160484da934e9060cb1cac5215efb0e5269.zip
Use simpler wpa_supplicant state tracking
Do not remove network on transition to DISCONNECTED state, it will be done when connection anyway. Also merge DISCONNECTED and INACTIVE states into one.
Diffstat (limited to 'plugins/supplicant.c')
-rw-r--r--plugins/supplicant.c22
1 files changed, 3 insertions, 19 deletions
diff --git a/plugins/supplicant.c b/plugins/supplicant.c
index 0d0c29b5..0ca65401 100644
--- a/plugins/supplicant.c
+++ b/plugins/supplicant.c
@@ -1625,25 +1625,6 @@ static void state_change(struct supplicant_task *task, DBusMessage *msg)
connman_network_set_connected(task->network, TRUE);
break;
- case WPA_DISCONNECTED:
- remove_network(task);
-
- /* carrier off */
- connman_network_set_connected(task->network, FALSE);
-
- if (task->disconnecting == TRUE) {
- connman_network_unref(task->network);
- task->disconnecting = FALSE;
-
- if (task->pending_network != NULL) {
- task->network = task->pending_network;
- task->pending_network = NULL;
- task_connect(task);
- } else
- task->network = NULL;
- }
- break;
-
case WPA_ASSOCIATING:
switch (prevstate) {
case WPA_COMPLETED:
@@ -1664,7 +1645,10 @@ static void state_change(struct supplicant_task *task, DBusMessage *msg)
default:
goto badstate;
}
+ /* fall through */
+ case WPA_DISCONNECTED:
+ /* carrier off */
connman_network_set_connected(task->network, FALSE);
if (task->disconnecting == TRUE) {