summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-01-02 15:34:37 +0100
committerStefan Metzmacher <metze@samba.org>2009-01-02 18:16:54 +0100
commit34cc50cb63a1a9e466d833de781e57b2f7c0b8ab (patch)
tree2070c892624f613f7a8c06172037c5c92c91039f
parent73ef1773bebc206522b0a285573254441fc6a18a (diff)
downloadsamba-34cc50cb63a1a9e466d833de781e57b2f7c0b8ab.tar.gz
samba-34cc50cb63a1a9e466d833de781e57b2f7c0b8ab.tar.bz2
samba-34cc50cb63a1a9e466d833de781e57b2f7c0b8ab.zip
s4:lib/events: convert to use tevent_* functions instead of compat macros
metze
-rw-r--r--source4/lib/events/tevent_s4.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/source4/lib/events/tevent_s4.c b/source4/lib/events/tevent_s4.c
index e50ff57e90..34a34a8e0b 100644
--- a/source4/lib/events/tevent_s4.c
+++ b/source4/lib/events/tevent_s4.c
@@ -17,38 +17,37 @@
*/
#include "includes.h"
-#include <events.h>
-#include <events_internal.h>
+#include "lib/events/events.h"
/*
this is used to catch debug messages from events
*/
-static void ev_wrap_debug(void *context, enum ev_debug_level level,
+static void ev_wrap_debug(void *context, enum tevent_debug_level level,
const char *fmt, va_list ap) PRINTF_ATTRIBUTE(3,0);
-static void ev_wrap_debug(void *context, enum ev_debug_level level,
+static void ev_wrap_debug(void *context, enum tevent_debug_level level,
const char *fmt, va_list ap)
{
int samba_level = -1;
char *s = NULL;
switch (level) {
- case EV_DEBUG_FATAL:
+ case TEVENT_DEBUG_FATAL:
samba_level = 0;
break;
- case EV_DEBUG_ERROR:
+ case TEVENT_DEBUG_ERROR:
samba_level = 1;
break;
- case EV_DEBUG_WARNING:
+ case TEVENT_DEBUG_WARNING:
samba_level = 2;
break;
- case EV_DEBUG_TRACE:
+ case TEVENT_DEBUG_TRACE:
samba_level = 5;
break;
};
vasprintf(&s, fmt, ap);
if (!s) return;
- DEBUG(samba_level, ("events: %s\n", s));
+ DEBUG(samba_level, ("tevent: %s\n", s));
free(s);
}
@@ -63,9 +62,9 @@ struct tevent_context *s4_event_context_init(TALLOC_CTX *mem_ctx)
{
struct tevent_context *ev;
- ev = event_context_init_byname(mem_ctx, NULL);
+ ev = tevent_context_init_byname(mem_ctx, NULL);
if (ev) {
- ev_set_debug(ev, ev_wrap_debug, NULL);
+ tevent_set_debug(ev, ev_wrap_debug, NULL);
}
return ev;
}
@@ -83,7 +82,7 @@ struct tevent_context *event_context_find(TALLOC_CTX *mem_ctx)
{
struct tevent_context *ev = talloc_find_parent_bytype(mem_ctx, struct tevent_context);
if (ev == NULL) {
- ev = event_context_init(mem_ctx);
+ ev = tevent_context_init(mem_ctx);
}
return ev;
}