gsupplicant: Disconnect request might not need to go through RemoveNetwork call
authorTomasz Bursztyka <tomasz.bursztyka@nokia.com>
Wed, 26 Jan 2011 08:09:44 +0000 (10:09 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Thu, 27 Jan 2011 11:56:09 +0000 (12:56 +0100)
gsupplicant/supplicant.c

index bed049a..8c91a83 100644 (file)
@@ -2835,6 +2835,12 @@ static void interface_disconnect_result(const char *error,
        if (error != NULL && data->callback != NULL)
                data->callback(-EIO, data->interface, data->user_data);
 
+       /* If we are disconnecting from previous WPS successful
+        * association. i.e.: it did not went through AddNetwork,
+        * and interface->network_path was never set. */
+       if (data->interface->network_path == NULL)
+               return;
+
        network_remove(data);
 }