summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Xu <martin.xu@intel.com>2009-07-16 07:22:36 +0800
committerMarcel Holtmann <marcel@holtmann.org>2009-07-16 03:07:37 +0200
commitda2d28b38c3b6d521652c55f0451feccd9d02a7f (patch)
treeb037049903f4ab5fb4292bee276ebba3dcf308ac
parentb4436ebb00f0e6363d6fd340b68950a9daa20fc0 (diff)
downloadconnman-da2d28b38c3b6d521652c55f0451feccd9d02a7f.tar.gz
connman-da2d28b38c3b6d521652c55f0451feccd9d02a7f.tar.bz2
connman-da2d28b38c3b6d521652c55f0451feccd9d02a7f.zip
Fix stalled configuration issue with supplicant
-rw-r--r--plugins/supplicant.c14
-rw-r--r--src/device.c3
2 files changed, 16 insertions, 1 deletions
diff --git a/plugins/supplicant.c b/plugins/supplicant.c
index b964ae7a..66a7580c 100644
--- a/plugins/supplicant.c
+++ b/plugins/supplicant.c
@@ -1617,6 +1617,20 @@ static void state_change(struct supplicant_task *task, DBusMessage *msg)
connman_network_set_associating(task->network, TRUE);
break;
+ case WPA_INACTIVE:
+ if (task->disconnecting == TRUE) {
+ connman_network_set_connected(task->network, FALSE);
+ 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);
+ }
+ }
+ break;
+
default:
connman_network_set_associating(task->network, FALSE);
break;
diff --git a/src/device.c b/src/device.c
index b3038ad6..3ee1f615 100644
--- a/src/device.c
+++ b/src/device.c
@@ -1432,7 +1432,8 @@ int __connman_device_disconnect(struct connman_device *device)
while (g_hash_table_iter_next(&iter, &key, &value) == TRUE) {
struct connman_network *network = value;
- if (connman_network_get_connected(network) == TRUE)
+ if (connman_network_get_connected(network) == TRUE ||
+ connman_network_get_associating(network) == TRUE)
__connman_network_disconnect(network);
}