aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wpa_cli.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2015-07-22 14:10:32 (GMT)
committerJouni Malinen <j@w1.fi>2015-07-22 14:10:32 (GMT)
commitb525cbab861a8338e3feffbae8a79ed36129a621 (patch)
tree072ae66240afedbfeda1d21e43e7347a61f0560a /wpa_supplicant/wpa_cli.c
parentacbd59d0a8e47afb745c900432e5da2873dfd851 (diff)
downloadhostap-b525cbab861a8338e3feffbae8a79ed36129a621.zip
hostap-b525cbab861a8338e3feffbae8a79ed36129a621.tar.gz
hostap-b525cbab861a8338e3feffbae8a79ed36129a621.tar.bz2
wpa_cli: Skip action script execution when eloop termination is pending
Try to exit more quickly by avoiding execution of the action script for any pending events if the process is requested to be killed. This may help in avoiding hitting the two second SIGALRM workaround in eloop in case some of the action scripts block for long period of time. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/wpa_cli.c')
-rw-r--r--wpa_supplicant/wpa_cli.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c
index c5d8333..2d1adc9 100644
--- a/wpa_supplicant/wpa_cli.c
+++ b/wpa_supplicant/wpa_cli.c
@@ -3585,6 +3585,9 @@ static void wpa_cli_action_process(const char *msg)
const char *ifname = ctrl_ifname;
char ifname_buf[100];
+ if (eloop_terminated())
+ return;
+
pos = msg;
if (os_strncmp(pos, "IFNAME=", 7) == 0) {
const char *end;