From 2fb69f51c47c8859485011879afb11650835ecbe Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 28 Feb 2013 10:54:21 +0100 Subject: s3:lib/events: add missing TEVENT_TRACE_BEFORE/AFTER_WAIT handling Signed-off-by: Stefan Metzmacher Reviewed-by: Michael Adam --- source3/lib/events.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source3/lib') 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", -- cgit