From edb259736d6287eefe424b817fdbc9bd55a611fc Mon Sep 17 00:00:00 2001 From: root Date: Wed, 9 Apr 2008 22:33:55 +0000 Subject: *** empty log message *** --- ev_poll.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'ev_poll.c') diff --git a/ev_poll.c b/ev_poll.c index 388aec0..a8fdebc 100644 --- a/ev_poll.c +++ b/ev_poll.c @@ -97,20 +97,18 @@ poll_poll (EV_P_ ev_tstamp timeout) fd_enomem (EV_A); else if (errno != EINTR) syserr ("(libev) poll"); - - return; } - - for (i = 0; i < pollcnt; ++i) - if (expect_false (polls [i].revents & POLLNVAL)) - fd_kill (EV_A_ polls [i].fd); - else - fd_event ( - EV_A_ - polls [i].fd, - (polls [i].revents & (POLLOUT | POLLERR | POLLHUP) ? EV_WRITE : 0) - | (polls [i].revents & (POLLIN | POLLERR | POLLHUP) ? EV_READ : 0) - ); + else if (res > 0) + for (i = 0; i < pollcnt; ++i) + if (expect_false (polls [i].revents & POLLNVAL)) + fd_kill (EV_A_ polls [i].fd); + else + fd_event ( + EV_A_ + polls [i].fd, + (polls [i].revents & (POLLOUT | POLLERR | POLLHUP) ? EV_WRITE : 0) + | (polls [i].revents & (POLLIN | POLLERR | POLLHUP) ? EV_READ : 0) + ); } int inline_size -- cgit v1.2.3