diff options
Diffstat (limited to 'source3/lib/events.c')
-rw-r--r-- | source3/lib/events.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source3/lib/events.c b/source3/lib/events.c index 77d18ec13d..9b0a2b6712 100644 --- a/source3/lib/events.c +++ b/source3/lib/events.c @@ -224,6 +224,21 @@ BOOL event_add_to_select_args(struct event_context *event_ctx, return True; } +BOOL events_pending(struct event_context *event_ctx) +{ + struct fd_event *fde; + + if (event_ctx->timed_events != NULL) { + return True; + } + for (fde = event_ctx->fd_events; fde; fde = fde->next) { + if (fde->flags & (EVENT_FD_READ|EVENT_FD_WRITE)) { + return True; + } + } + return False; +} + BOOL run_events(struct event_context *event_ctx, int selrtn, fd_set *read_fds, fd_set *write_fds) { |