diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-12-14 08:21:59 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-14 08:22:14 +0100 |
commit | 1410c9e37dc638f04053ebe1b7d5688575ff235b (patch) | |
tree | 66d9a95aa411ffa52257428e9e673318d2328743 /source3/lib | |
parent | 40889dccdfec1148481a542c3afc518c11b0642c (diff) | |
download | samba-1410c9e37dc638f04053ebe1b7d5688575ff235b.tar.gz samba-1410c9e37dc638f04053ebe1b7d5688575ff235b.tar.bz2 samba-1410c9e37dc638f04053ebe1b7d5688575ff235b.zip |
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)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/debug.c | 4 |
1 files changed, 4 insertions, 0 deletions
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) { |