From 251b03eee626c10b294eee4a45a1dcc82a4fd1d9 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 30 Jul 2009 08:37:01 +0200 Subject: s4:cmdline: setup talloc log and abort functions metze --- source4/include/includes.h | 5 ----- source4/lib/cmdline/popt_common.c | 7 +++++++ 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'source4') diff --git a/source4/include/includes.h b/source4/include/includes.h index e94c0fe633..babef870b1 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -68,11 +68,6 @@ #include "../lib/util/smb_threads.h" #include "../lib/util/smb_threads_internal.h" -#if 0 -/* darn, we can't do this now that we don't link the ldb tools to all the smb libs */ -#define TALLOC_ABORT(reason) smb_panic(reason) -#endif - #if defined(UID_WRAPPER) #if !defined(UID_WRAPPER_REPLACE) && !defined(UID_WRAPPER_NOT_REPLACE) #define UID_WRAPPER_REPLACE diff --git a/source4/lib/cmdline/popt_common.c b/source4/lib/cmdline/popt_common.c index 712d99996c..0273c4fe1c 100644 --- a/source4/lib/cmdline/popt_common.c +++ b/source4/lib/cmdline/popt_common.c @@ -53,6 +53,11 @@ static void popt_version_callback(poptContext con, } } +static void popt_s4_talloc_log_fn(const char *message) +{ + DEBUG(0,("%s", message)); +} + static void popt_samba_callback(poptContext con, enum poptCallbackReason reason, const struct poptOption *opt, @@ -86,6 +91,8 @@ static void popt_samba_callback(poptContext con, /* and logging */ setup_logging(pname, DEBUG_STDOUT); + talloc_set_log_fn(popt_s4_talloc_log_fn); + talloc_set_abort_fn(smb_panic); return; } -- cgit