From: root Date: Thu, 1 Nov 2007 18:13:44 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: rel-0_5~54 X-Git-Url: https://git.llucax.com/software/libev.git/commitdiff_plain/e6e8e6f69de8027f07467fd43ebf55ac108eeb21?ds=inline *** empty log message *** --- diff --git a/event.c b/event.c index 0cd278d..14a06c2 100644 --- a/event.c +++ b/event.c @@ -182,7 +182,7 @@ int event_add (struct event *ev, struct timeval *tv) ++x_actives; } - if (ev->ev_events & (EV_READ|EV_WRITE)) + if (ev->ev_events & (EV_READ | EV_WRITE)) { if (ev_is_active (&ev->io)) { @@ -190,7 +190,7 @@ int event_add (struct event *ev, struct timeval *tv) --x_actives; } - ev_io_set (&ev->io, ev->ev_fd, ev->ev_events); + ev_io_set (&ev->io, ev->ev_fd, ev->ev_events & (EV_READ | EV_WRITE)); ev_io_start (&ev->io); ++x_actives; } @@ -335,7 +335,7 @@ int event_base_once (struct event_base *base, int fd, short events, void (*cb)(i once->cb = cb; once->arg = arg; - ev_once (fd, events & (EV_READ|EV_WRITE), tv_get (tv), x_once_cb, (void *)once); + ev_once (fd, events & (EV_READ | EV_WRITE), tv_get (tv), x_once_cb, (void *)once); return 0; }