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-5.2.1~1075 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ee7004a7ee67b68c56c6a601529d50e86043e5da;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); } /*********************************************************************