summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-08-03 11:30:44 +0200
committerAndrew Tridgell <tridge@samba.org>2009-08-24 16:30:00 +1000
commite8782de8fe51310e89eb480f0a67f1d392698896 (patch)
tree20aeae2cd63c26b23b1887fa20956383bd11957e /source3
parent851b01f64ed8c5dbb7f4b9cf058d94e5a685d86e (diff)
downloadsamba-e8782de8fe51310e89eb480f0a67f1d392698896.tar.gz
samba-e8782de8fe51310e89eb480f0a67f1d392698896.tar.bz2
samba-e8782de8fe51310e89eb480f0a67f1d392698896.zip
s3:lib: setup talloc log and abort functions
metze
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/popt_common.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/lib/popt_common.c b/source3/lib/popt_common.c
index e14477c979..342309d1a7 100644
--- a/source3/lib/popt_common.c
+++ b/source3/lib/popt_common.c
@@ -59,6 +59,11 @@ static void set_logfile(poptContext con, const char * arg)
static bool PrintSambaVersionString;
+static void popt_s3_talloc_log_fn(const char *message)
+{
+ DEBUG(0,("%s", message));
+}
+
static void popt_common_callback(poptContext con,
enum poptCallbackReason reason,
const struct poptOption *opt,
@@ -67,6 +72,8 @@ static void popt_common_callback(poptContext con,
if (reason == POPT_CALLBACK_REASON_PRE) {
set_logfile(con, get_dyn_LOGFILEBASE());
+ talloc_set_log_fn(popt_s3_talloc_log_fn);
+ talloc_set_abort_fn(smb_panic);
return;
}