aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ctrl_iface_unix.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2013-07-11 13:19:19 (GMT)
committerJouni Malinen <j@w1.fi>2013-07-11 14:04:29 (GMT)
commitb62b29ea875b49c6007857338aff8895f363618b (patch)
tree1fac3dafc6c4723bf8fdd9ef407b298f37423ca9 /wpa_supplicant/ctrl_iface_unix.c
parenteb7ddbf108252f7ff30170b7fa62192cfd4cdc99 (diff)
downloadhostap-b62b29ea875b49c6007857338aff8895f363618b.zip
hostap-b62b29ea875b49c6007857338aff8895f363618b.tar.gz
hostap-b62b29ea875b49c6007857338aff8895f363618b.tar.bz2
Do not block on ctrl_iface monitor events
It looks like some of the global control interface cases ended up blocking in sendmsg() when trying to send an event. Since this can block all wpa_supplicant processing for multiple seconds, this is very undesirable. Avoid this by requesting sendmsg() to return an error rather than waiting for the message to be sent. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/ctrl_iface_unix.c')
-rw-r--r--wpa_supplicant/ctrl_iface_unix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/wpa_supplicant/ctrl_iface_unix.c b/wpa_supplicant/ctrl_iface_unix.c
index 1b4b9b0..fc0d649 100644
--- a/wpa_supplicant/ctrl_iface_unix.c
+++ b/wpa_supplicant/ctrl_iface_unix.c
@@ -602,7 +602,7 @@ static void wpa_supplicant_ctrl_iface_send(const char *ifname, int sock,
offsetof(struct sockaddr_un, sun_path));
msg.msg_name = (void *) &dst->addr;
msg.msg_namelen = dst->addrlen;
- if (sendmsg(sock, &msg, 0) < 0) {
+ if (sendmsg(sock, &msg, MSG_DONTWAIT) < 0) {
int _errno = errno;
wpa_printf(MSG_INFO, "CTRL_IFACE monitor[%d]: "
"%d - %s",