mirror of
https://github.com/samba-team/samba.git
synced 2025-01-14 19:24:43 +03:00
r23562: Add dump_event_list() for debugging the event list.
Guenther (This used to be commit 4e1e697ac48513719bd3a2152f17871bc00df796)
This commit is contained in:
parent
1deb049a02
commit
90773ab0be
@ -391,3 +391,27 @@ int cancel_named_event(struct event_context *event_ctx,
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void dump_event_list(struct event_context *event_ctx)
|
||||||
|
{
|
||||||
|
struct timed_event *te;
|
||||||
|
struct timeval evt, now;
|
||||||
|
|
||||||
|
if (!event_ctx) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
now = timeval_current();
|
||||||
|
|
||||||
|
DEBUG(10,("dump_event_list:\n"));
|
||||||
|
|
||||||
|
for (te = event_ctx->timed_events; te; te = te->next) {
|
||||||
|
|
||||||
|
evt = timeval_until(&now, &te->when);
|
||||||
|
|
||||||
|
DEBUGADD(10,("Event \"%s\" %lx handled in %d seconds\n",
|
||||||
|
te->event_name,
|
||||||
|
(unsigned long)te,
|
||||||
|
(int)evt.tv_sec));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user