]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hostapd: Register wpa_msg callback even if only global ctrl_iface is used
authorVeerendranath Jakkam <vjakkam@codeaurora.org>
Thu, 21 Nov 2019 13:25:47 +0000 (18:55 +0530)
committerJouni Malinen <j@w1.fi>
Mon, 2 Dec 2019 13:46:32 +0000 (15:46 +0200)
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 <vjakkam@codeaurora.org>
hostapd/ctrl_iface.c

index 721c08b0fca99f8c8edf5a81fe058a594eeefa1c..1f1cea1114f4910035c10c2108ea1d4d6b4c2033 100644 (file)
@@ -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: