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 {