From 655dc4a4321382fd7691a33c5ece1dbbada15f9a Mon Sep 17 00:00:00 2001 From: Daisuke Niwa Date: Mon, 12 Dec 2016 22:13:51 +0900 Subject: [PATCH] Send "TERMINATING" event from hostapd hostapd didn't send "TERMINATING" event when stopped by SIGTERM. Android handles this event to stop monitor thread. This commit adds "TERMINATING" event same as with wpa_supplicant. Signed-off-by: Tomoharu Hatano --- 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 7c4037906..29c17bf95 100644 --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c @@ -357,8 +357,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); }