[PATCH] Send "TERMINATING" event from hostapd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Daisuke Niwa <daisuke.x.niwa@xxxxxxxxxxxxxx>

Hostapd doesn't send "TERMINATING" event when stopping by
SIGTERM. Android handles this event to stop monitor thread.

This patch adds "TERMINATING" event same as wpa_supplicant.

Change-Id: Ie31339085bf656df1895c762d4b38ba1e3de726f
Signed-off-by: Tomoharu Hatano <tomoharu.hatano@xxxxxxxxxxxxxx>
---
 src/ap/hostapd.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
index 42c1aaaeb..752ca067e 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
@@ -355,8 +355,10 @@ static void hostapd_cleanup(struct hostapd_data *hapd)
 	wpa_printf(MSG_DEBUG, "%s(hapd=%p (%s))", __func__, hapd,
 		   hapd->conf->iface);
 	if (hapd->iface->interfaces &&
-	    hapd->iface->interfaces->ctrl_iface_deinit)
+	    hapd->iface->interfaces->ctrl_iface_deinit) {
+		wpa_msg(hapd->msg_ctx, MSG_INFO, WPA_EVENT_TERMINATING);
 		hapd->iface->interfaces->ctrl_iface_deinit(hapd);
+	}
 	hostapd_free_hapd_data(hapd);
 }
 
-- 
2.11.0


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux