PERFORCE change 137036 for review
Sam Leffler
sam at FreeBSD.org
Thu Mar 6 23:52:55 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=137036
Change 137036 by sam at 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;
}
}
More information about the p4-projects
mailing list