From: Eric Bollengier Date: Mon, 27 Feb 2023 10:24:48 +0000 (+0100) Subject: Fix #9907 About Director crash with Runscript Console X-Git-Tag: Release-13.0.3~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02c7ded60e3fc607d5312f3c1ed2fe49cb5356cf;p=thirdparty%2Fbacula.git Fix #9907 About Director crash with Runscript Console --- 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();