aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2009-03-17 14:56:30 (GMT)
committerJouni Malinen <j@w1.fi>2009-03-22 14:17:47 (GMT)
commita109f0af0b0889676c9831c0c26237d47223a364 (patch)
tree26bf4571796379168b43df1764cda7a3bd05e8b0 /wpa_supplicant
parentf0d38185d57762d4d808deb2fcd59d96d3de63bf (diff)
downloadhostap-06-a109f0af0b0889676c9831c0c26237d47223a364.zip
hostap-06-a109f0af0b0889676c9831c0c26237d47223a364.tar.gz
hostap-06-a109f0af0b0889676c9831c0c26237d47223a364.tar.bz2
Detach ctrl_iface monitor if the client socket is removed
No need to wait for 10 errors when using UNIX domain socket; we can detach the client immediately on ENOENT. (cherry picked from commit c5aaa015627daa1e9fba7065e07294f952b295cf)
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/ctrl_iface_unix.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/wpa_supplicant/ctrl_iface_unix.c b/wpa_supplicant/ctrl_iface_unix.c
index bf6328e..870e9c0 100644
--- a/wpa_supplicant/ctrl_iface_unix.c
+++ b/wpa_supplicant/ctrl_iface_unix.c
@@ -514,9 +514,12 @@ static void wpa_supplicant_ctrl_iface_send(struct ctrl_iface_priv *priv,
msg.msg_name = (void *) &dst->addr;
msg.msg_namelen = dst->addrlen;
if (sendmsg(priv->sock, &msg, 0) < 0) {
- perror("sendmsg(CTRL_IFACE monitor)");
+ int _errno = errno;
+ wpa_printf(MSG_INFO, "CTRL_IFACE monitor[%d]: "
+ "%d - %s",
+ idx, errno, strerror(errno));
dst->errors++;
- if (dst->errors > 10) {
+ if (dst->errors > 10 || _errno == ENOENT) {
wpa_supplicant_ctrl_iface_detach(
priv, &dst->addr,
dst->addrlen);