1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-01 04:58:35 +03:00

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>
This commit is contained in:
Stefan Metzmacher 2013-02-28 10:54:21 +01:00 committed by Michael Adam
parent f14ba6460a
commit 2fb69f51c4

View File

@ -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",