diff options
author | Stefan Metzmacher <metze@samba.org> | 2009-01-02 13:39:56 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2009-01-02 18:16:53 +0100 |
commit | 4f04b06ac2cfceddaabcbf661f9878ff69a6f01b (patch) | |
tree | 96788f8f0e71b9e517b63ba53f9e31ac8133626e /lib/tevent/tevent_debug.c | |
parent | d79fc2ffcd9802d927f82f014c2b13c7eb8cc873 (diff) | |
download | samba-4f04b06ac2cfceddaabcbf661f9878ff69a6f01b.tar.gz samba-4f04b06ac2cfceddaabcbf661f9878ff69a6f01b.tar.bz2 samba-4f04b06ac2cfceddaabcbf661f9878ff69a6f01b.zip |
tevent: rename ev_debug_ops => tevent_debug_ops
And related changes, but we keep compat macros
metze
Diffstat (limited to 'lib/tevent/tevent_debug.c')
-rw-r--r-- | lib/tevent/tevent_debug.c | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/lib/tevent/tevent_debug.c b/lib/tevent/tevent_debug.c index 4fa58534b4..841446bf6c 100644 --- a/lib/tevent/tevent_debug.c +++ b/lib/tevent/tevent_debug.c @@ -30,10 +30,12 @@ /* this allows the user to choose their own debug function */ -int ev_set_debug(struct tevent_context *ev, - void (*debug)(void *context, enum ev_debug_level level, - const char *fmt, va_list ap), - void *context) +int tevent_set_debug(struct tevent_context *ev, + void (*debug)(void *context, + enum tevent_debug_level level, + const char *fmt, + va_list ap) PRINTF_ATTRIBUTE(3,0), + void *context) { ev->debug_ops.debug = debug; ev->debug_ops.context = context; @@ -43,23 +45,26 @@ int ev_set_debug(struct tevent_context *ev, /* debug function for ev_set_debug_stderr */ -void ev_debug_stderr(void *context, enum ev_debug_level level, - const char *fmt, va_list ap) PRINTF_ATTRIBUTE(3,0); -void ev_debug_stderr(void *context, enum ev_debug_level level, - const char *fmt, va_list ap) +static void tevent_debug_stderr(void *private_data, + enum tevent_debug_level level, + const char *fmt, + va_list ap) PRINTF_ATTRIBUTE(3,0); +static void tevent_debug_stderr(void *private_data, + enum tevent_debug_level level, + const char *fmt, va_list ap) { - if (level <= EV_DEBUG_WARNING) { + if (level <= TEVENT_DEBUG_WARNING) { vfprintf(stderr, fmt, ap); } } /* convenience function to setup debug messages on stderr - messages of level EV_DEBUG_WARNING and higher are printed + messages of level TEVENT_DEBUG_WARNING and higher are printed */ -int ev_set_debug_stderr(struct tevent_context *ev) +int tevent_set_debug_stderr(struct tevent_context *ev) { - return ev_set_debug(ev, ev_debug_stderr, ev); + return tevent_set_debug(ev, tevent_debug_stderr, ev); } /* @@ -70,7 +75,8 @@ int ev_set_debug_stderr(struct tevent_context *ev) * Applications using the library must decide where to * redirect debugging messages */ -void ev_debug(struct tevent_context *ev, enum ev_debug_level level, const char *fmt, ...) +void tevent_debug(struct tevent_context *ev, enum tevent_debug_level level, + const char *fmt, ...) { va_list ap; if (ev->debug_ops.debug == NULL) { |