From 1410c9e37dc638f04053ebe1b7d5688575ff235b Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 14 Dec 2007 08:21:59 +0100 Subject: debug: fix crash bug when DEBUG() is used before setup_logging() this was introduced by the pstring removal (1ea3ac80146b83c2522b69e7747c823366a2b47d) metze (This used to be commit a412e6c7c676a054acd9db371221a50078cfe1d9) --- source3/lib/debug.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3') diff --git a/source3/lib/debug.c b/source3/lib/debug.c index 4afc953c3e..185c2373f4 100644 --- a/source3/lib/debug.c +++ b/source3/lib/debug.c @@ -894,6 +894,10 @@ static void format_debug_text( const char *msg ) size_t i; bool timestamp = (!stdout_logging && (lp_timestamp_logs() || !(lp_loaded()))); + if (!format_bufr) { + debug_init(); + } + for( i = 0; msg[i]; i++ ) { /* Indent two spaces at each new line. */ if(timestamp && 0 == format_pos) { -- cgit