summaryrefslogtreecommitdiff
path: root/source4/lib/events
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-02-13 08:52:12 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:09:48 -0500
commitcc336df026db5b613c2416163a5167bfe57fb810 (patch)
treed122961f8ba3eff391eb1849ae824a867ad466a9 /source4/lib/events
parent11e6c958fdfda9c42f0e69f59af7f1d2bdca010c (diff)
downloadsamba-cc336df026db5b613c2416163a5167bfe57fb810.tar.gz
samba-cc336df026db5b613c2416163a5167bfe57fb810.tar.bz2
samba-cc336df026db5b613c2416163a5167bfe57fb810.zip
r5370: epoll gives more precise event bits like EPOLLHUP instead of just EPOLLIN. We need to map
these to "read" events for the events code to work on errors like connection refused (thanks to vl for noticing this bug) (This used to be commit 7c379590b4ca808eddef5c3ac15db25cefc5215b)
Diffstat (limited to 'source4/lib/events')
-rw-r--r--source4/lib/events/events.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/lib/events/events.c b/source4/lib/events/events.c
index 3460627399..9783603759 100644
--- a/source4/lib/events/events.c
+++ b/source4/lib/events/events.c
@@ -404,7 +404,8 @@ static int event_loop_epoll(struct event_context *ev, struct timeval *tvalp)
epoll_fallback_to_select(ev, "epoll_wait() gave bad data");
return -1;
}
- if (events[i].events & EPOLLIN) flags |= EVENT_FD_READ;
+ if (events[i].events & (EPOLLIN|EPOLLHUP|EPOLLERR))
+ flags |= EVENT_FD_READ;
if (events[i].events & EPOLLOUT) flags |= EVENT_FD_WRITE;
if (flags) {
fde->handler(ev, fde, flags, fde->private);