Date: Mon, 9 Apr 2007 16:22:54 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 117745 for review Message-ID: <200704091622.l39GMslk091653@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=117745 Change 117745 by sam@sam_ebb on 2007/04/09 16:22:07 merge local change to terminate on last network interface going away; this has been passed upstream to Jouni who said he'd integrate it into his code base Affected files ... .. //depot/projects/wifi/contrib/wpa_supplicant/events.c#3 edit Differences ... ==== //depot/projects/wifi/contrib/wpa_supplicant/events.c#3 (text) ==== @@ -753,6 +753,17 @@ wpa_s->last_michael_mic_error = t.sec; } +#ifdef CONFIG_TERMINATE_ONLASTIF +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; +} +#endif /* CONFIG_TERMINATE_ONLASTIF */ static void wpa_supplicant_event_interface_status(struct wpa_supplicant *wpa_s, @@ -778,6 +789,11 @@ wpa_supplicant_mark_disassoc(wpa_s); l2_packet_deinit(wpa_s->l2); wpa_s->l2 = NULL; +#ifdef CONFIG_TERMINATE_ONLASTIF + /* check if last interface */ + if (!any_interfaces(wpa_s->global->ifaces)) + eloop_terminate(); +#endif /* CONFIG_TERMINATE_ONLASTIF */ break; } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200704091622.l39GMslk091653>