]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Send "TERMINATING" event from hostapd
authorDaisuke Niwa <daisuke.x.niwa@sonymobile.com>
Mon, 12 Dec 2016 13:13:51 +0000 (22:13 +0900)
committerJouni Malinen <j@w1.fi>
Mon, 12 Dec 2016 18:32:28 +0000 (20:32 +0200)
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 <tomoharu.hatano@sonymobile.com>
src/ap/hostapd.c

index 7c40379065436ee8621726c629a3badd25547dd6..29c17bf95a7b5a9ba8fd76e7346442ad34c81e5f 100644 (file)
@@ -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);
 }