Fix per-SSID scan (scan_ssid=1)
Commit d3a9822542
broke per-SSID scan
by using the ssid variable for internal loop and by doing so,
overriding the value that was needed below to figure out whether the
scan is for a specific SSID. Fix this by using a temporary variable
instead when looping over network finding which frequencies to scan for.
This commit is contained in:
parent
5228401cbc
commit
5be45e2e6e
1 changed files with 5 additions and 5 deletions
|
@ -300,7 +300,7 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx)
|
||||||
*/
|
*/
|
||||||
ssid = NULL;
|
ssid = NULL;
|
||||||
} else {
|
} else {
|
||||||
struct wpa_ssid *start = ssid;
|
struct wpa_ssid *start = ssid, *tssid;
|
||||||
int freqs_set = 0;
|
int freqs_set = 0;
|
||||||
if (ssid == NULL && max_ssids > 1)
|
if (ssid == NULL && max_ssids > 1)
|
||||||
ssid = wpa_s->conf->ssid;
|
ssid = wpa_s->conf->ssid;
|
||||||
|
@ -324,12 +324,12 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx)
|
||||||
ssid = wpa_s->conf->ssid;
|
ssid = wpa_s->conf->ssid;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (ssid = wpa_s->conf->ssid; ssid; ssid = ssid->next) {
|
for (tssid = wpa_s->conf->ssid; tssid; tssid = tssid->next) {
|
||||||
if (ssid->disabled)
|
if (tssid->disabled)
|
||||||
continue;
|
continue;
|
||||||
if ((params.freqs || !freqs_set) && ssid->scan_freq) {
|
if ((params.freqs || !freqs_set) && tssid->scan_freq) {
|
||||||
int_array_concat(¶ms.freqs,
|
int_array_concat(¶ms.freqs,
|
||||||
ssid->scan_freq);
|
tssid->scan_freq);
|
||||||
} else {
|
} else {
|
||||||
os_free(params.freqs);
|
os_free(params.freqs);
|
||||||
params.freqs = NULL;
|
params.freqs = NULL;
|
||||||
|
|
Loading…
Reference in a new issue