summaryrefslogtreecommitdiff
path: root/event.c
diff options
context:
space:
mode:
authorroot <root>2007-11-01 18:13:44 +0000
committerroot <root>2007-11-01 18:13:44 +0000
commite6e8e6f69de8027f07467fd43ebf55ac108eeb21 (patch)
tree77a755c8aa442a4d94ca3c1792cf4c29d0c92f7e /event.c
parent3787a64d2fc7b4ac00bd3ea924d7a5b6a6e5ca3d (diff)
*** empty log message ***
Diffstat (limited to 'event.c')
-rw-r--r--event.c6
1 files 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;
}