From 06c47874b300f61f721d05769959b3d34ff11d12 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 16 Aug 2004 21:07:01 +0000 Subject: r1839: pulling a few more changes from 3.0 --- source/lib/debug.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source/lib/debug.c') diff --git a/source/lib/debug.c b/source/lib/debug.c index e5e203e076a..01aedb47740 100644 --- a/source/lib/debug.c +++ b/source/lib/debug.c @@ -572,6 +572,7 @@ BOOL reopen_logs( void ) oldumask = umask( 022 ); pstrcpy(fname, debugf ); + debugf[0] = '\0'; if (lp_loaded()) { char *logfname; @@ -726,7 +727,12 @@ void check_log_size( void ) errno = old_errno; return( 0 ); } - + + /* prevent recursion by checking if reopen_logs() has temporaily + set the debugf string to "" */ + if( debugf[0] == '\0') + return( 0 ); + #ifdef WITH_SYSLOG if( !lp_syslog_only() ) #endif -- cgit