summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/events.c37
1 files changed, 1 insertions, 36 deletions
diff --git a/source3/lib/events.c b/source3/lib/events.c
index 3b7794b0dd..0a8039ac6e 100644
--- a/source3/lib/events.c
+++ b/source3/lib/events.c
@@ -414,41 +414,6 @@ static bool s3_tevent_init(void)
return initialized;
}
-/*
- this is used to catch debug messages from events
-*/
-static void s3_event_debug(void *context, enum tevent_debug_level level,
- const char *fmt, va_list ap) PRINTF_ATTRIBUTE(3,0);
-
-static void s3_event_debug(void *context, enum tevent_debug_level level,
- const char *fmt, va_list ap)
-{
- int samba_level = -1;
- char *s = NULL;
- switch (level) {
- case TEVENT_DEBUG_FATAL:
- samba_level = 0;
- break;
- case TEVENT_DEBUG_ERROR:
- samba_level = 1;
- break;
- case TEVENT_DEBUG_WARNING:
- samba_level = 2;
- break;
- case TEVENT_DEBUG_TRACE:
- samba_level = 11;
- break;
-
- };
- if (CHECK_DEBUGLVL(samba_level)) {
- if (vasprintf(&s, fmt, ap) == -1) {
- return;
- }
- DEBUG(samba_level, ("s3_event: %s", s));
- free(s);
- }
-}
-
struct tevent_context *s3_tevent_context_init(TALLOC_CTX *mem_ctx)
{
struct tevent_context *ev;
@@ -457,7 +422,7 @@ struct tevent_context *s3_tevent_context_init(TALLOC_CTX *mem_ctx)
ev = tevent_context_init_byname(mem_ctx, "s3");
if (ev) {
- tevent_set_debug(ev, s3_event_debug, NULL);
+ samba_tevent_set_debug(ev, "s3_tevent");
}
return ev;