aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
authorBen Greear <greearb@candelatech.com>2012-06-24 13:19:34 +0300
committerJouni Malinen <j@w1.fi>2012-06-24 13:19:34 +0300
commitf115560c21db876be8a6272f389c02034eccbdcb (patch)
treef9c5ed5ec2c76edc27de64d53b87427b6cf40691 /src/utils
parentef3e60bf22beab7f43b0028e552155211450ed81 (diff)
downloadexternal_wpa_supplicant_8_ti-f115560c21db876be8a6272f389c02034eccbdcb.zip
external_wpa_supplicant_8_ti-f115560c21db876be8a6272f389c02034eccbdcb.tar.gz
external_wpa_supplicant_8_ti-f115560c21db876be8a6272f389c02034eccbdcb.tar.bz2
eloop/poll: Handle POLLER | POLLHUP in read logic
Without this, we can get into a tight loop because the code in general doesn't add eloop exception handlers, so socket reporting the POLLERR would never be read. With this change, any socket with POLLERR or POLLHUP asserted will be handled by the read logic. Signed-hostap: Ben Greear <greearb@candelatech.com>
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/eloop.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/utils/eloop.c b/src/utils/eloop.c
index 5691f15..b50ea92 100644
--- a/src/utils/eloop.c
+++ b/src/utils/eloop.c
@@ -350,7 +350,8 @@ static void eloop_sock_table_dispatch(struct eloop_sock_table *readers,
int max_pollfd_map)
{
if (eloop_sock_table_dispatch_table(readers, pollfds_map,
- max_pollfd_map, POLLIN))
+ max_pollfd_map, POLLIN | POLLERR |
+ POLLHUP))
return; /* pollfds may be invalid at this point */
if (eloop_sock_table_dispatch_table(writers, pollfds_map,