aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/eloop_win.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2008-06-03 08:37:48 (GMT)
committerJouni Malinen <j@w1.fi>2008-06-03 08:37:48 (GMT)
commit7e1488494e0150ee7fdef83355266b5633c5c1b0 (patch)
tree9484d22fd3eb4698dd871e88eb1521a0da0e2a13 /src/utils/eloop_win.c
parent8479707beb67c225bbbe89f099cb66699e900622 (diff)
downloadhostap-7e1488494e0150ee7fdef83355266b5633c5c1b0.zip
hostap-7e1488494e0150ee7fdef83355266b5633c5c1b0.tar.gz
hostap-7e1488494e0150ee7fdef83355266b5633c5c1b0.tar.bz2
Do not continually reschedule specific scans to help finding hidden SSIDs
In situations where the driver does background scanning and sends a steady stream of scan results, wpa_supplicant would continually reschedule the scan. This resulted in specific SSID scans never happening for a hidden AP, and the supplicant never connecting to the AP because it never got found. Instead, if there's an already scheduled scan, and a request comes in to reschedule it, and there are enabled scan_ssid=1 network blocks, let the scan happen anyway so the hidden SSID has a chance to be found.
Diffstat (limited to 'src/utils/eloop_win.c')
-rw-r--r--src/utils/eloop_win.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/utils/eloop_win.c b/src/utils/eloop_win.c
index 73f0eaf..a1ccd94 100644
--- a/src/utils/eloop_win.c
+++ b/src/utils/eloop_win.c
@@ -320,6 +320,25 @@ int eloop_cancel_timeout(eloop_timeout_handler handler,
}
+int eloop_is_timeout_registered(eloop_timeout_handler handler,
+ void *eloop_data, void *user_data)
+{
+ struct eloop_timeout *tmp;
+
+ tmp = eloop.timeout;
+ while (tmp != NULL) {
+ if (tmp->handler == handler &&
+ tmp->eloop_data == eloop_data &&
+ tmp->user_data == user_data)
+ return 1;
+
+ tmp = tmp->next;
+ }
+
+ return 0;
+}
+
+
/* TODO: replace with suitable signal handler */
#if 0
static void eloop_handle_signal(int sig)