From: Timo Sirainen Date: Mon, 26 May 2003 13:07:12 +0000 (+0300) Subject: bugfix X-Git-Tag: 1.1.alpha1~4602 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8116b251c211f8f0f1af454da5c549136937308;p=thirdparty%2Fdovecot%2Fcore.git bugfix --HG-- branch : HEAD --- diff --git a/src/lib/ioloop-poll.c b/src/lib/ioloop-poll.c index 3ef56b0971..bb1600ceba 100644 --- a/src/lib/ioloop-poll.c +++ b/src/lib/ioloop-poll.c @@ -186,13 +186,11 @@ void io_loop_handler_run(struct ioloop *ioloop) pollfd = &data->fds[data->fd_index[io->fd]]; if (pollfd->revents != 0) { - ret--; - if (pollfd->revents & POLLNVAL) { i_error("invalid I/O fd %d, callback %p", io->fd, (void *) io->callback); pollfd->events &= ~POLLNVAL; - pollfd->revents &= ~POLLNVAL; + pollfd->revents = 0; call = FALSE; } else if ((io->condition & (IO_READ|IO_WRITE)) == (IO_READ|IO_WRITE)) { @@ -208,6 +206,9 @@ void io_loop_handler_run(struct ioloop *ioloop) call = FALSE; } + if (pollfd->revents == 0) + ret--; + if (call) { t_id = t_push(); io->callback(io->context);