From: Veerendranath Jakkam Date: Thu, 21 Nov 2019 13:25:47 +0000 (+0530) Subject: hostapd: Register wpa_msg callback even if only global ctrl_iface is used X-Git-Tag: hostap_2_10~2195 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3c13af55731c06ca24f7df0734f11b94649a7d39;p=thirdparty%2Fhostap.git hostapd: Register wpa_msg callback even if only global ctrl_iface is used Previously, wpa_msg_register_cb() was called only from successful completion of per-interface control interface initialization. This would leave the callback unregistered in case only the global control interface is used which would result in not delivering control interface events on the global interface. Fix this by registering the callback handler also from successful initialization of the global control interface. Signed-off-by: Veerendranath Jakkam --- diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c index 721c08b0f..1f1cea111 100644 --- a/hostapd/ctrl_iface.c +++ b/hostapd/ctrl_iface.c @@ -4364,6 +4364,8 @@ try_again: return -1; } + wpa_msg_register_cb(hostapd_ctrl_iface_msg_cb); + return 0; fail: @@ -4466,6 +4468,8 @@ fail: eloop_register_read_sock(s, hostapd_global_ctrl_iface_receive, interface, NULL); + wpa_msg_register_cb(hostapd_ctrl_iface_msg_cb); + return 0; fail: