aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/eapol_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/eapol_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/eapol_test.c')
-rw-r--r--wpa_supplicant/eapol_test.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/wpa_supplicant/eapol_test.c b/wpa_supplicant/eapol_test.c
index c73ec85..4eed854 100644
--- a/wpa_supplicant/eapol_test.c
+++ b/wpa_supplicant/eapol_test.c
@@ -949,10 +949,9 @@ static int scard_get_triplets(int argc, char *argv[])
}
-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();
}
@@ -1128,7 +1127,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;
}
@@ -1171,8 +1170,8 @@ int main(int argc, char *argv[])
eloop_register_timeout(timeout, 0, eapol_test_timeout, &eapol_test,
NULL);
eloop_register_timeout(0, 0, send_eap_request_identity, &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();
eloop_cancel_timeout(eapol_test_timeout, &eapol_test, NULL);