aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/preauth_test.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2009-12-19 17:22:16 (GMT)
committerJouni Malinen <j@w1.fi>2009-12-19 17:22:16 (GMT)
commit0456ea16d8edfa47c4ff1ddabf4f496a3c5c67bd (patch)
treee9d5e769ac18c55f6fc7104f56b72fba7fcb0f7a /wpa_supplicant/preauth_test.c
parent9969e5a46a4671a6c75dfc6c2952296e170bf50b (diff)
downloadhostap-0456ea16d8edfa47c4ff1ddabf4f496a3c5c67bd.zip
hostap-0456ea16d8edfa47c4ff1ddabf4f496a3c5c67bd.tar.gz
hostap-0456ea16d8edfa47c4ff1ddabf4f496a3c5c67bd.tar.bz2
eloop: Remove global user data pointer
This is not really needed since all signal handlers can use a context pointer provided during signal handler registration.
Diffstat (limited to 'wpa_supplicant/preauth_test.c')
-rw-r--r--wpa_supplicant/preauth_test.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/wpa_supplicant/preauth_test.c b/wpa_supplicant/preauth_test.c
index a24d65f..cebe2ba 100644
--- a/wpa_supplicant/preauth_test.c
+++ b/wpa_supplicant/preauth_test.c
@@ -277,10 +277,9 @@ static void wpa_init_conf(struct wpa_supplicant *wpa_s, const char *ifname)
}
-static void eapol_test_terminate(int sig, void *eloop_ctx,
- void *signal_ctx)
+static void eapol_test_terminate(int sig, void *signal_ctx)
{
- struct wpa_supplicant *wpa_s = eloop_ctx;
+ struct wpa_supplicant *wpa_s = signal_ctx;
wpa_msg(wpa_s, MSG_INFO, "Signal %d received - terminating", sig);
eloop_terminate();
}
@@ -317,7 +316,7 @@ int main(int argc, char *argv[])
return -1;
}
- if (eloop_init(&wpa_s)) {
+ if (eloop_init()) {
wpa_printf(MSG_ERROR, "Failed to initialize event loop");
return -1;
}
@@ -354,8 +353,8 @@ int main(int argc, char *argv[])
eloop_register_timeout(30, 0, eapol_test_timeout, &preauth_test, NULL);
eloop_register_timeout(0, 100000, eapol_test_poll, &wpa_s, NULL);
- eloop_register_signal_terminate(eapol_test_terminate, NULL);
- eloop_register_signal_reconfig(eapol_test_terminate, NULL);
+ eloop_register_signal_terminate(eapol_test_terminate, &wpa_s);
+ eloop_register_signal_reconfig(eapol_test_terminate, &wpa_s);
eloop_run();
if (preauth_test.auth_timed_out)