X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=src%2FIOHandler%2FIOEngine_epoll.c;h=5c5ab38710d357b25e902602018bc3ffc1c9d68e;hb=6d94611a64ceef3401522a0ad404facd82146315;hp=060f87ff4c14d13d37cfde04457371576f79d6c3;hpb=9e6045c7b6d7afc774eeb59fa5f5c4e02fe1f037;p=NextIRCd.git diff --git a/src/IOHandler/IOEngine_epoll.c b/src/IOHandler/IOEngine_epoll.c index 060f87f..5c5ab38 100644 --- a/src/IOHandler/IOEngine_epoll.c +++ b/src/IOHandler/IOEngine_epoll.c @@ -43,7 +43,7 @@ static void engine_epoll_add(struct _IOSocket *iosock) { struct epoll_event evt; int res; - evt.events = EPOLLHUP | EPOLLIN | (iosocket_wants_writes(iosock) ? EPOLLOUT : 0); + evt.events = EPOLLHUP | (iosocket_wants_reads(iosock) ? EPOLLIN : 0) | (iosocket_wants_writes(iosock) ? EPOLLOUT : 0); evt.data.ptr = iosock; res = epoll_ctl(epoll_fd, EPOLL_CTL_ADD, iosock->fd, &evt); if(res < 0) @@ -59,7 +59,7 @@ static void engine_epoll_update(struct _IOSocket *iosock) { struct epoll_event evt; int res; - evt.events = EPOLLHUP | EPOLLIN | (iosocket_wants_writes(iosock) ? EPOLLOUT : 0); + evt.events = EPOLLHUP | (iosocket_wants_reads(iosock) ? EPOLLIN : 0) | (iosocket_wants_writes(iosock) ? EPOLLOUT : 0); evt.data.ptr = iosock; res = epoll_ctl(epoll_fd, EPOLL_CTL_MOD, iosock->fd, &evt); if(res < 0)