From a839a2f7765735ec1ccc79d2d49ca10abe84e1a7 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Fri, 12 Feb 2010 12:01:22 +0100 Subject: [PATCH] Fix bug #1501 -t does not print errors --- bacula/src/lib/message.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/bacula/src/lib/message.c b/bacula/src/lib/message.c index bfeb8295b3..9696779926 100644 --- a/bacula/src/lib/message.c +++ b/bacula/src/lib/message.c @@ -675,6 +675,17 @@ void dispatch_message(JCR *jcr, int type, utime_t mtime, char *msg) return; } + /* For serious errors make sure message is printed or logged */ + if (type == M_ABORT || type == M_ERROR_TERM) { + fputs(dt, stdout); + fputs(msg, stdout); + fflush(stdout); + if (type == M_ABORT) { + syslog(LOG_DAEMON|LOG_ERR, "%s", msg); + } + } + + /* Now figure out where to send the message */ msgs = NULL; if (!jcr) { -- 2.39.5