diff options
author | Jouni Malinen <jouni.malinen@atheros.com> | 2009-11-10 18:00:57 +0200 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2009-11-10 18:00:57 +0200 |
commit | 5be45e2e6ef9992224376db0bd882ea8450f2621 (patch) | |
tree | 704bedbe167d324d29cbb37db86a99f37b8691a3 /wpa_supplicant/scan.c | |
parent | 5228401cbc2969da5660ec07ff113de769f92e64 (diff) | |
download | external_wpa_supplicant_8_ti-5be45e2e6ef9992224376db0bd882ea8450f2621.zip external_wpa_supplicant_8_ti-5be45e2e6ef9992224376db0bd882ea8450f2621.tar.gz external_wpa_supplicant_8_ti-5be45e2e6ef9992224376db0bd882ea8450f2621.tar.bz2 |
Fix per-SSID scan (scan_ssid=1)
Commit d3a9822542166e7adec16e24622486ba90359ef5 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.
Diffstat (limited to 'wpa_supplicant/scan.c')
-rw-r--r-- | wpa_supplicant/scan.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c index 1428d32..bb1f5b5 100644 --- a/wpa_supplicant/scan.c +++ b/wpa_supplicant/scan.c @@ -300,7 +300,7 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx) */ ssid = NULL; } else { - struct wpa_ssid *start = ssid; + struct wpa_ssid *start = ssid, *tssid; int freqs_set = 0; if (ssid == NULL && max_ssids > 1) 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; } - for (ssid = wpa_s->conf->ssid; ssid; ssid = ssid->next) { - if (ssid->disabled) + for (tssid = wpa_s->conf->ssid; tssid; tssid = tssid->next) { + if (tssid->disabled) continue; - if ((params.freqs || !freqs_set) && ssid->scan_freq) { + if ((params.freqs || !freqs_set) && tssid->scan_freq) { int_array_concat(¶ms.freqs, - ssid->scan_freq); + tssid->scan_freq); } else { os_free(params.freqs); params.freqs = NULL; |