Do not trigger initial scan if there are no enabled networks

This allows wpa_supplicant to be started quickly with an empty
configuration. If an external program wants to fetch scan results
from wpa_supplicant, it will need to request a scan explicitly
in this type of case.
This commit is contained in:
Jouni Malinen 2010-04-16 18:56:23 +03:00 committed by Jouni Malinen
parent 37eb8da957
commit 74e259ec7c

View file

@ -1836,8 +1836,11 @@ int wpa_supplicant_driver_init(struct wpa_supplicant *wpa_s)
wpa_drv_flush_pmkid(wpa_s);
wpa_s->prev_scan_ssid = WILDCARD_SSID_SCAN;
if (wpa_supplicant_enabled_networks(wpa_s->conf)) {
wpa_supplicant_req_scan(wpa_s, interface_count, 100000);
interface_count++;
} else
wpa_supplicant_set_state(wpa_s, WPA_INACTIVE);
return 0;
}