]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Call wpas_notify_network_selected only if a specific network was selected
authorJouni Malinen <jouni.malinen@atheros.com>
Tue, 10 Nov 2009 16:06:02 +0000 (18:06 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 10 Nov 2009 16:06:02 +0000 (18:06 +0200)
ssid could be NULL here at least based on the function documentation,
so better check whether that is the case prior to calling the
notification function.

wpa_supplicant/wpa_supplicant.c

index 78fa04b48c216e9959c8e8bbc23ee633ef302e61..f715000070a9ebd0a600aa265e44ee3424dc458f 100644 (file)
@@ -1481,7 +1481,8 @@ void wpa_supplicant_select_network(struct wpa_supplicant *wpa_s,
        wpa_s->reassociate = 1;
        wpa_supplicant_req_scan(wpa_s, 0, 0);
 
-       wpas_notify_network_selected(wpa_s, ssid);
+       if (ssid)
+               wpas_notify_network_selected(wpa_s, ssid);
 }