From e6e8e6f69de8027f07467fd43ebf55ac108eeb21 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 1 Nov 2007 18:13:44 +0000 Subject: [PATCH] *** empty log message *** --- event.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; } -- 2.43.0