Browse Source

Call wpas_notify_network_selected only if a specific network was selected

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.
Jouni Malinen 15 years ago
parent
commit
a1641d2671
1 changed files with 2 additions and 1 deletions
  1. 2 1
      wpa_supplicant/wpa_supplicant.c

+ 2 - 1
wpa_supplicant/wpa_supplicant.c

@@ -1481,7 +1481,8 @@ void wpa_supplicant_select_network(struct wpa_supplicant *wpa_s,
 	wpa_s->reassociate = 1;
 	wpa_s->reassociate = 1;
 	wpa_supplicant_req_scan(wpa_s, 0, 0);
 	wpa_supplicant_req_scan(wpa_s, 0, 0);
 
 
-	wpas_notify_network_selected(wpa_s, ssid);
+	if (ssid)
+		wpas_notify_network_selected(wpa_s, ssid);
 }
 }