diff options
author | sam <sam@FreeBSD.org> | 2006-03-07 05:44:45 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2006-03-07 05:44:45 +0000 |
commit | f87f3cf9d3ac68ade33194941f85722ffdff2195 (patch) | |
tree | 72b7a4837fa3c101b02d8b1b2b0cc478c8b033e3 /contrib/wpa_supplicant/events.c | |
parent | 8b3f1ba26b4b0c34e27cf045b5873f791d667e6e (diff) | |
download | FreeBSD-src-f87f3cf9d3ac68ade33194941f85722ffdff2195.zip FreeBSD-src-f87f3cf9d3ac68ade33194941f85722ffdff2195.tar.gz |
resolve merge conflicts
MFC after: 2 weeks
Diffstat (limited to 'contrib/wpa_supplicant/events.c')
-rw-r--r-- | contrib/wpa_supplicant/events.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/contrib/wpa_supplicant/events.c b/contrib/wpa_supplicant/events.c index d8762e9..b1207ba 100644 --- a/contrib/wpa_supplicant/events.c +++ b/contrib/wpa_supplicant/events.c @@ -10,6 +10,8 @@ * license. * * See README and COPYING for more details. + * + * $FreeBSD$ */ #include <stdlib.h> @@ -698,6 +700,16 @@ wpa_supplicant_event_michael_mic_failure(struct wpa_supplicant *wpa_s, } +static int any_interfaces(struct wpa_supplicant *head) +{ + struct wpa_supplicant *wpa_s; + + for (wpa_s = head; wpa_s != NULL; wpa_s = wpa_s->next) + if (!wpa_s->interface_removed) + return 1; + return 0; +} + static void wpa_supplicant_event_interface_status(struct wpa_supplicant *wpa_s, union wpa_event_data *data) @@ -722,6 +734,9 @@ wpa_supplicant_event_interface_status(struct wpa_supplicant *wpa_s, wpa_supplicant_mark_disassoc(wpa_s); l2_packet_deinit(wpa_s->l2); wpa_s->l2 = NULL; + /* check if last interface */ + if (!any_interfaces(wpa_s->global->ifaces)) + eloop_terminate(); break; } } |