PERFORCE change 117745 for review
Sam Leffler
sam at FreeBSD.org
Mon Apr 9 16:22:55 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=117745
Change 117745 by sam at 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;
}
}
More information about the p4-projects
mailing list