From: Jouni Malinen Date: Tue, 3 Mar 2015 15:03:25 +0000 (+0200) Subject: Interworking: Clear SCANNING state if no match found X-Git-Tag: hostap_2_4~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=192ad3d7307473f14c049c1ea724e292a3f8ae24;p=thirdparty%2Fhostap.git Interworking: Clear SCANNING state if no match found Previously, it was possible for wpa_state to be left at SCANNING if INTERWORKING_SELECT command failed to find any match. Now the state is set to DISCONNECTED if the operation terminates because of no matching networks. Signed-off-by: Jouni Malinen --- diff --git a/wpa_supplicant/interworking.c b/wpa_supplicant/interworking.c index ec60f9d55..4a3966544 100644 --- a/wpa_supplicant/interworking.c +++ b/wpa_supplicant/interworking.c @@ -2491,6 +2491,8 @@ static void interworking_select_network(struct wpa_supplicant *wpa_s) wpa_msg(wpa_s, MSG_INFO, INTERWORKING_NO_MATCH "No network " "with matching credentials found"); + if (wpa_s->wpa_state == WPA_SCANNING) + wpa_supplicant_set_state(wpa_s, WPA_DISCONNECTED); } if (selected) {