]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hostapd_cli: Process events received following control iface commands
authorMikael Kanstrup <mikael.kanstrup@sonymobile.com>
Wed, 12 Oct 2016 12:18:58 +0000 (14:18 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 16 Oct 2016 09:26:52 +0000 (12:26 +0300)
Events received as an immediate result of control interface commands
end up on the control request message callback function instead of
the registered read socket. This makes for example the station list
used for complete functions for disassociate and deauthenticate out
of sync. Process events in the message callback function too to ensure
no events are missed.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
hostapd/hostapd_cli.c

index d0d2a54be1de6447e2753fea49a8f0116e62204b..e5670104678dd02231ef6c0aac62eeaee5ff2103 100644 (file)
@@ -46,6 +46,7 @@ static void print_help(FILE *stream, const char *cmd);
 static char ** list_cmd_list(void);
 static void hostapd_cli_receive(int sock, void *eloop_ctx, void *sock_ctx);
 static void update_stations(struct wpa_ctrl *ctrl);
+static void cli_event(const char *str);
 
 
 static void usage(void)
@@ -181,6 +182,7 @@ static int hostapd_cli_reconnect(const char *ifname)
 
 static void hostapd_cli_msg_cb(char *msg, size_t len)
 {
+       cli_event(msg);
        printf("%s\n", msg);
 }