Browse Source

Cancel authentication timeout on local deauth/disassoc request

Without this, the timeout may be left behind even when we are not
connected and may result in unwanted operation when the timeout
triggers.
Jouni Malinen 14 years ago
parent
commit
eb0a3c7f96
1 changed files with 2 additions and 0 deletions
  1. 2 0
      wpa_supplicant/wpa_supplicant.c

+ 2 - 0
wpa_supplicant/wpa_supplicant.c

@@ -1326,6 +1326,7 @@ void wpa_supplicant_disassociate(struct wpa_supplicant *wpa_s,
 	eapol_sm_notify_config(wpa_s->eapol, NULL, NULL);
 	if (old_ssid != wpa_s->current_ssid)
 		wpas_notify_network_changed(wpa_s);
+	eloop_cancel_timeout(wpa_supplicant_timeout, wpa_s, NULL);
 }
 
 
@@ -1360,6 +1361,7 @@ void wpa_supplicant_deauthenticate(struct wpa_supplicant *wpa_s,
 	eapol_sm_notify_config(wpa_s->eapol, NULL, NULL);
 	if (old_ssid != wpa_s->current_ssid)
 		wpas_notify_network_changed(wpa_s);
+	eloop_cancel_timeout(wpa_supplicant_timeout, wpa_s, NULL);
 }