From owner-p4-projects@FreeBSD.ORG Thu Mar 6 23:52:55 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 395161065696; Thu, 6 Mar 2008 23:52:55 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC8721065684 for ; Thu, 6 Mar 2008 23:52:54 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id DBA8D8FC26 for ; Thu, 6 Mar 2008 23:52:54 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m26NqsBF059431 for ; Thu, 6 Mar 2008 23:52:54 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m26NqsBi059429 for perforce@freebsd.org; Thu, 6 Mar 2008 23:52:54 GMT (envelope-from sam@freebsd.org) Date: Thu, 6 Mar 2008 23:52:54 GMT Message-Id: <200803062352.m26NqsBi059429@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 137036 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Mar 2008 23:52:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=137036 Change 137036 by sam@sam_ebb on 2008/03/06 23:52:34 add back local mods Affected files ... .. //depot/projects/vap/contrib/wpa_supplicant/events.c#4 edit Differences ... ==== //depot/projects/vap/contrib/wpa_supplicant/events.c#4 (text) ==== @@ -803,6 +803,18 @@ } +#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, union wpa_event_data *data) @@ -827,6 +839,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; } }