Index: third_party/libevent/event.c |
=================================================================== |
--- third_party/libevent/event.c (revision 90439) |
+++ third_party/libevent/event.c (working copy) |
@@ -469,6 +469,7 @@ |
struct timeval tv; |
struct timeval *tv_p; |
int res, done; |
+ int processed_active = 0; |
/* clear time cache */ |
base->tv_cache.tv_sec = 0; |
@@ -523,6 +524,7 @@ |
if (base->event_count_active) { |
event_process_active(base); |
+ processed_active = 1; |
if (!base->event_count_active && (flags & EVLOOP_ONCE)) |
done = 1; |
} else if (flags & EVLOOP_NONBLOCK) |
@@ -533,7 +535,7 @@ |
base->tv_cache.tv_sec = 0; |
event_debug(("%s: asked to terminate loop.", __func__)); |
- return (0); |
+ return (processed_active ? 2 : 0); |
wtc
2011/06/25 00:39:45
The return value 0 means success. 1 means no even
|
} |
/* Sets up an event for processing once */ |