]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Do not try auto connect mechanism in disconnected state
authorJouni Malinen <jouni@qca.qualcomm.com>
Sun, 12 May 2013 16:15:33 +0000 (19:15 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 12 May 2013 16:18:55 +0000 (19:18 +0300)
This cleans up debug log by not requesting the auto connect on
dissassociation event if we are already in disconnected state and would
not try to connect anyway.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

wpa_supplicant/events.c

index 98ef1bf9c1cd9d7fbde1a2a874cedcf524e71511..463c8e651d5d9f7fa67720a218fac5709c61d452 100644 (file)
@@ -1964,8 +1964,9 @@ static void wpa_supplicant_event_disassoc_finish(struct wpa_supplicant *wpa_s,
                        "pre-shared key may be incorrect");
                wpas_auth_failed(wpa_s);
        }
-       if (!wpa_s->auto_reconnect_disabled ||
-           wpa_s->key_mgmt == WPA_KEY_MGMT_WPS) {
+       if (!wpa_s->disconnected &&
+           (!wpa_s->auto_reconnect_disabled ||
+            wpa_s->key_mgmt == WPA_KEY_MGMT_WPS)) {
                wpa_dbg(wpa_s, MSG_DEBUG, "Auto connect enabled: try to "
                        "reconnect (wps=%d wpa_state=%d)",
                        wpa_s->key_mgmt == WPA_KEY_MGMT_WPS,