summaryrefslogtreecommitdiff
path: root/lib/tevent/tevent_debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tevent/tevent_debug.c')
-rw-r--r--lib/tevent/tevent_debug.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/tevent/tevent_debug.c b/lib/tevent/tevent_debug.c
index 3f4112831a..31da7b9683 100644
--- a/lib/tevent/tevent_debug.c
+++ b/lib/tevent/tevent_debug.c
@@ -94,3 +94,26 @@ void tevent_debug(struct tevent_context *ev, enum tevent_debug_level level,
va_end(ap);
}
+void tevent_set_trace_callback(struct tevent_context *ev,
+ tevent_trace_callback_t cb,
+ void *private_data)
+{
+ ev->tracing.callback = cb;
+ ev->tracing.private_data = private_data;
+}
+
+void tevent_get_trace_callback(struct tevent_context *ev,
+ tevent_trace_callback_t *cb,
+ void *private_data)
+{
+ *cb = ev->tracing.callback;
+ *(void**)private_data = ev->tracing.private_data;
+}
+
+void tevent_trace_point_callback(struct tevent_context *ev,
+ enum tevent_trace_point tp)
+{
+ if (ev->tracing.callback != NULL) {
+ ev->tracing.callback(tp, ev->tracing.private_data);
+ }
+}