From 7e71bfc9aa012989d72f0efd32f5525dd76ea54b Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Mon, 26 Oct 2009 01:58:39 -0700 Subject: [PATCH] Fix another messages error problem pointed out by Eric --- bacula/src/lib/message.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/bacula/src/lib/message.c b/bacula/src/lib/message.c index 0ad7f2c9e9..9b5e2d5ff5 100644 --- a/bacula/src/lib/message.c +++ b/bacula/src/lib/message.c @@ -1357,16 +1357,8 @@ void Qmsg(JCR *jcr, int type, utime_t mtime, const char *fmt,...) if (!jcr) { jcr = get_jcr_from_tsd(); } - /* If no jcr or no queue send to daemon */ - if ((jcr && !jcr->msg_queue) || !jcr) { - /* jcr==NULL => daemon message, safe to send now */ - Jmsg(jcr, item->type, item->mtime, "%s", item->msg); - free(item); - /* - * If we are dequeuing, we cannot queue another item, - * so as a last resort send it to the syslog - */ - } else if (jcr->dequeuing_msgs) { + /* If no jcr or no queue or dequeuing send to syslog */ + if (!jcr || !jcr->msg_queue || jcr->dequeuing_msgs) { syslog(LOG_DAEMON|LOG_ERR, "%s", item->msg); free(item); } else { -- 2.39.5