summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-05-16 15:42:53 +0200
committerVolker Lendecke <vl@samba.org>2009-05-16 19:22:03 +0200
commitad91ef7f968b289f449fdeb2eb4b1cdbfa682b4d (patch)
tree1d29f1a7e94438b9a84fbb9fd526c50f0c6de705
parentebb79e27dcea6e0b8215b878c9d42bcc9dd960e7 (diff)
downloadsamba-ad91ef7f968b289f449fdeb2eb4b1cdbfa682b4d.tar.gz
samba-ad91ef7f968b289f449fdeb2eb4b1cdbfa682b4d.tar.bz2
samba-ad91ef7f968b289f449fdeb2eb4b1cdbfa682b4d.zip
s3-events: If immediate requests are pending, the timeout is 0
-rw-r--r--source3/lib/events.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/lib/events.c b/source3/lib/events.c
index 90d86c6c79..6fc3a9727b 100644
--- a/source3/lib/events.c
+++ b/source3/lib/events.c
@@ -70,6 +70,11 @@ bool event_add_to_select_args(struct tevent_context *ev,
}
}
+ if (ev->immediate_events != NULL) {
+ *timeout = timeval_zero();
+ return true;
+ }
+
if (ev->timer_events == NULL) {
return ret;
}
@@ -140,6 +145,10 @@ struct timeval *get_timed_events_timeout(struct tevent_context *ev,
if (ev->timer_events == NULL) {
return NULL;
}
+ if (ev->immediate_events != NULL) {
+ *to_ret = timeval_zero();
+ return to_ret;
+ }
now = timeval_current();
*to_ret = timeval_until(&now, &ev->timer_events->next_event);