From: Kern Sibbald Date: Mon, 26 Oct 2009 08:58:39 +0000 (-0700) Subject: Fix another messages error problem pointed out by Eric X-Git-Tag: Release-7.0.0~2598^2~34 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=85d7f0d2737ac5654ee9b328a784671b032cb59b;p=bacula%2Fbacula Fix another messages error problem pointed out by Eric --- 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 {