From 02c7ded60e3fc607d5312f3c1ed2fe49cb5356cf Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Mon, 27 Feb 2023 11:24:48 +0100 Subject: [PATCH] Fix #9907 About Director crash with Runscript Console --- bacula/src/dird/job.c | 2 +- bacula/src/dird/ua_server.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bacula/src/dird/job.c b/bacula/src/dird/job.c index e4199065f..160da65b3 100644 --- a/bacula/src/dird/job.c +++ b/bacula/src/dird/job.c @@ -268,7 +268,7 @@ static bool setup_resume_job(JCR *jcr, JOB_DBR *jr) int errstat; jcr->lock(); Dsm_check(100); - init_msg(jcr, jcr->messages); + init_msg(jcr, jcr->messages, job_code_callback_director); /* Initialize termination condition variable */ if ((errstat = pthread_cond_init(&jcr->term_wait, NULL)) != 0) { diff --git a/bacula/src/dird/ua_server.c b/bacula/src/dird/ua_server.c index 1c0cc190c..37c00b876 100644 --- a/bacula/src/dird/ua_server.c +++ b/bacula/src/dird/ua_server.c @@ -102,6 +102,7 @@ JCR *new_control_jcr(const char *base_name, int job_type) LockRes(); jcr->job = (JOB *)GetNextRes(R_JOB, NULL); set_jcr_defaults(jcr, jcr->job); + init_msg(jcr, jcr->messages, job_code_callback_director); /* We use a resource, so we should count in the reload */ jcr->setJobType(job_type); UnlockRes(); -- 2.47.3