From 2e950503554feccfba2875b34238837ec8452599 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Thu, 30 Sep 2010 14:28:33 +0200 Subject: [PATCH] Fix pt_out() that can loose a message if the trace file can't be opened. --- bacula/src/lib/message.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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); } /********************************************************************* -- 2.39.5