Fix enabling of networks while another network is being used
authorKel Modderman <kel@otaku42.de>
Sun, 2 May 2010 08:08:03 +0000 (11:08 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 2 May 2010 08:08:03 +0000 (11:08 +0300)
Enable a network block, even if there is a current configuration, if it
was disabled.

Signed-off-by: Kel Modderman <kel@otaku42.de>
wpa_supplicant/wpa_supplicant.c

index 01e89df..5563f0b 100644 (file)
@@ -1392,13 +1392,15 @@ void wpa_supplicant_enable_network(struct wpa_supplicant *wpa_s,
                }
                if (wpa_s->reassociate)
                        wpa_supplicant_req_scan(wpa_s, 0, 0);
-       } else if (wpa_s->current_ssid == NULL && ssid->disabled) {
-               /*
-                * Try to reassociate since there is no current configuration
-                * and a new network was made available.
-                */
-               wpa_s->reassociate = 1;
-               wpa_supplicant_req_scan(wpa_s, 0, 0);
+       } else if (ssid->disabled) {
+               if (wpa_s->current_ssid == NULL) {
+                       /*
+                        * Try to reassociate since there is no current
+                        * configuration and a new network was made available.
+                        */
+                       wpa_s->reassociate = 1;
+                       wpa_supplicant_req_scan(wpa_s, 0, 0);
+               }
 
                was_disabled = ssid->disabled;