summaryrefslogtreecommitdiff
path: root/event.c
diff options
context:
space:
mode:
authorroot <root>2007-11-03 19:41:55 +0000
committerroot <root>2007-11-03 19:41:55 +0000
commit2c478454e9a3a21bdc62c7f46b02149795888437 (patch)
tree38dd02f524e16080587ed2910bde70a808ff7bd2 /event.c
parentb8c10cda08d48348f422bb3d31f019584cf252c9 (diff)
try to programmatically integrate libevent
Diffstat (limited to 'event.c')
-rw-r--r--event.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/event.c b/event.c
index 490e9c2..0c53e2f 100644
--- a/event.c
+++ b/event.c
@@ -90,10 +90,12 @@ int event_dispatch (void)
return event_base_dispatch (x_cur);
}
+#ifdef EV_STANDALONE
void event_set_log_callback (event_log_cb cb)
{
/* nop */
}
+#endif
int event_loop (int flags)
{
@@ -102,7 +104,7 @@ int event_loop (int flags)
int event_loopexit (struct timeval *tv)
{
- event_base_loopexit (x_cur, tv);
+ return event_base_loopexit (x_cur, tv);
}
static void
@@ -174,7 +176,7 @@ void event_set (struct event *ev, int fd, short events, void (*cb)(int, short, v
int event_once (int fd, short events, void (*cb)(int, short, void *), void *arg, struct timeval *tv)
{
- event_base_once (x_cur, fd, events, cb, arg, tv);
+ return event_base_once (x_cur, fd, events, cb, arg, tv);
}
int event_add (struct event *ev, struct timeval *tv)
@@ -237,7 +239,7 @@ int event_del (struct event *ev)
int event_pending (struct event *ev, short events, struct timeval *tv)
{
- short revents;
+ short revents = 0;
if (ev->ev_events & EV_SIGNAL)
{
@@ -309,6 +311,8 @@ int event_base_loopexit (struct event_base *base, struct timeval *tv)
ev_tstamp after = tv_get (tv);
ev_once (-1, 0, after >= 0. ? after : 0., x_loopexit_cb, (void *)base);
+
+ return -1;
}
struct x_once