From: Eric Bollengier Date: Thu, 30 Sep 2010 12:28:33 +0000 (+0200) Subject: Fix pt_out() that can loose a message if the trace file can't be opened. X-Git-Tag: Release-7.0.0~1540 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2e950503554feccfba2875b34238837ec8452599;p=bacula%2Fbacula Fix pt_out() that can loose a message if the trace file can't be opened. --- diff --git a/bacula/src/lib/message.c b/bacula/src/lib/message.c index 60fbfdc974..ca6ed8d416 100644 --- a/bacula/src/lib/message.c +++ b/bacula/src/lib/message.c @@ -954,14 +954,15 @@ static void pt_out(char *buf) if (trace_fd) { fputs(buf, trace_fd); fflush(trace_fd); + return; } else { /* Some problem, turn off tracing */ trace = false; } - } else { /* not tracing */ - fputs(buf, stdout); - fflush(stdout); } + /* not tracing */ + fputs(buf, stdout); + fflush(stdout); } /*********************************************************************