gsupplicant: Remove network even if disconnect failed
authorSamuel Ortiz <sameo@linux.intel.com>
Thu, 23 Dec 2010 11:57:16 +0000 (12:57 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Thu, 23 Dec 2010 11:57:16 +0000 (12:57 +0100)
If a connection is in progress but is cancelled before wpa supplicant
reached the ASSOCIATING phase, removing the network is the only way to
prevent it from continuing the association.

gsupplicant/supplicant.c

index 8d2c15f..42f4920 100644 (file)
@@ -2472,10 +2472,8 @@ static void interface_disconnect_result(const char *error,
 
        SUPPLICANT_DBG("");
 
-       if (error != NULL && data->callback != NULL) {
+       if (error != NULL && data->callback != NULL)
                data->callback(-EIO, data->interface, data->user_data);
-               return;
-       }
 
        network_remove(data);
 }