diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2005-04-13 21:15:37 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2005-04-13 21:15:37 +0000 |
commit | d0ce38bc9b74fae350509cf7e5be7fe308e49204 (patch) | |
tree | 4a8f1334515e99f58fb0af054769166ac200d1d0 /usr.sbin/hostapd/hostapd.c | |
parent | 4b6fcb58281e0581b34105566467ba4525578917 (diff) |
un-hack, use event_loopexit()
ok henning@ brad@
Diffstat (limited to 'usr.sbin/hostapd/hostapd.c')
-rw-r--r-- | usr.sbin/hostapd/hostapd.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/usr.sbin/hostapd/hostapd.c b/usr.sbin/hostapd/hostapd.c index f931024862f..9280816e5c5 100644 --- a/usr.sbin/hostapd/hostapd.c +++ b/usr.sbin/hostapd/hostapd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hostapd.c,v 1.7 2005/04/13 19:59:08 jmc Exp $ */ +/* $OpenBSD: hostapd.c,v 1.8 2005/04/13 21:15:36 reyk Exp $ */ /* * Copyright (c) 2004, 2005 Reyk Floeter <reyk@vantronix.net> @@ -55,9 +55,6 @@ struct hostapd_config hostapd_cfg; extern char *__progname; -/* defined in event(3) to terminate the event loop */ -extern volatile sig_atomic_t event_gotterm; - void hostapd_usage(void) { @@ -262,13 +259,17 @@ hostapd_udp_init(struct hostapd_config *cfg) void hostapd_sig_handler(int sig) { + struct timeval tv; + + tv.tv_sec = 0; + tv.tv_usec = 0; + switch (sig) { case SIGALRM: case SIGTERM: case SIGQUIT: case SIGINT: - /* This will terminate libevent's main loop */ - event_gotterm = 1; + event_loopexit(&tv); } } |