1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-21 01:59:07 +03:00

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)
This commit is contained in:
Andrew Tridgell 2005-02-13 08:52:12 +00:00 committed by Gerald (Jerry) Carter
parent 11e6c958fd
commit cc336df026

@ -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);