int sys_offset = get_system_utc_offset();
int ret = pgsql_get_utc_offset(this, &pgsql_offset);
if (ret != 0) {
- Jmsg(jcr, ret, 0, "%s", errmsg);
+ Qmsg(jcr, ret, 0, "%s", errmsg);
} else {
if (sys_offset != pgsql_offset) {
/* try again in case we would be just on Daylight Saving Time switch */
sys_offset = get_system_utc_offset();
}
if (sys_offset != pgsql_offset) {
- Jmsg(jcr, M_WARNING, 0, _("Postgresql and sytem timezone mismatch detected\n"));
+ Qmsg(jcr, M_WARNING, 0, _("Postgresql and system timezone mismatch detected\n"));
}
}
}
if (print_msg) {
Jmsg(jcr, print_msg, 0, "%s", errmsg);
}
+ dequeue_daemon_messages(jcr);
return retval;
}
if (daemon_msg_queue && !dequeuing_daemon_msgs) {
P(daemon_msg_queue_mutex);
dequeuing_daemon_msgs = true;
- jcr->dequeuing_msgs = true;
- JobId = jcr->JobId;
- jcr->JobId = 0; /* set daemon JobId == 0 */
- if (jcr->dir_bsock) jcr->dir_bsock->suppress_error_messages(true);
+ if (jcr != NULL) {
+ jcr->dequeuing_msgs = true;
+ JobId = jcr->JobId;
+ jcr->JobId = 0; /* set daemon JobId == 0 */
+ if (jcr->dir_bsock) jcr->dir_bsock->suppress_error_messages(true);
+ }
foreach_dlist(item, daemon_msg_queue) {
if (item->type == M_FATAL || item->type == M_ERROR) {
item->type = M_SECURITY;
item->repeat+1, item->msg);
}
}
- if (jcr->dir_bsock) jcr->dir_bsock->suppress_error_messages(false);
/* Remove messages just sent */
daemon_msg_queue->destroy();
- jcr->JobId = JobId; /* restore JobId */
- jcr->dequeuing_msgs = false;
+ if (jcr != NULL) {
+ if (jcr->dir_bsock) jcr->dir_bsock->suppress_error_messages(false);
+ jcr->JobId = JobId; /* restore JobId */
+ jcr->dequeuing_msgs = false;
+ }
dequeuing_daemon_msgs = false;
V(daemon_msg_queue_mutex);
}