summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2013-02-28 10:54:21 +0100
committerMichael Adam <obnox@samba.org>2013-02-28 12:05:36 +0100
commit2fb69f51c47c8859485011879afb11650835ecbe (patch)
tree981542f0facfa15089d8b1d438e73fadb3e77e38
parentf14ba6460a08794074bf1395a6d3886aee2fcb57 (diff)
downloadsamba-2fb69f51c47c8859485011879afb11650835ecbe.tar.gz
samba-2fb69f51c47c8859485011879afb11650835ecbe.tar.bz2
samba-2fb69f51c47c8859485011879afb11650835ecbe.zip
s3:lib/events: add missing TEVENT_TRACE_BEFORE/AFTER_WAIT handling
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
-rw-r--r--source3/lib/events.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/lib/events.c b/source3/lib/events.c
index 011fcdc2e1..3b7794b0dd 100644
--- a/source3/lib/events.c
+++ b/source3/lib/events.c
@@ -314,6 +314,7 @@ static int s3_event_loop_once(struct tevent_context *ev, const char *location)
int timeout;
int num_pfds;
int ret;
+ int poll_errno;
timeout = INT_MAX;
@@ -333,7 +334,12 @@ static int s3_event_loop_once(struct tevent_context *ev, const char *location)
return -1;
}
+ tevent_trace_point_callback(ev, TEVENT_TRACE_BEFORE_WAIT);
ret = poll(state->pfds, num_pfds, timeout);
+ poll_errno = errno;
+ tevent_trace_point_callback(ev, TEVENT_TRACE_AFTER_WAIT);
+ errno = poll_errno;
+
if (ret == -1 && errno != EINTR) {
tevent_debug(ev, TEVENT_DEBUG_FATAL,
"poll() failed: %d:%s\n",