gsupplicant: Fix deadlock when disassociate while associating
authorMohamed Abbas <mabbas@linux.intel.com>
Wed, 27 Oct 2010 10:17:39 +0000 (03:17 -0700)
committerSamuel Ortiz <sameo@linux.intel.com>
Tue, 2 Nov 2010 10:56:00 +0000 (11:56 +0100)
Without setting the associating flag to false, ConnMan could potentially enter
an infinite loop through __connman_network_disconnect().

plugins/wifi.c

index a159a9d..69548fd 100644 (file)
@@ -617,6 +617,8 @@ static int network_disconnect(struct connman_network *network)
        if (wifi == NULL || wifi->interface == NULL)
                return -ENODEV;
 
+       connman_network_set_associating(network, FALSE);
+
        return g_supplicant_interface_disconnect(wifi->interface,
                                                disconnect_callback, wifi);
 }