]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Fix #9907 About Director crash with Runscript Console
authorEric Bollengier <eric@baculasystems.com>
Mon, 27 Feb 2023 10:24:48 +0000 (11:24 +0100)
committerEric Bollengier <eric@baculasystems.com>
Tue, 2 May 2023 07:07:18 +0000 (09:07 +0200)
bacula/src/dird/job.c
bacula/src/dird/ua_server.c

index e4199065f6c7d25df0d40a4d40014ee87bbed25b..160da65b396f7c89202b706b07b686d8eb7ff0d8 100644 (file)
@@ -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) {
index 1c0cc190c47f5ba23497fe161143443cbdf9bd75..37c00b876668e25b0763f99b98c33ee6910f5d55 100644 (file)
@@ -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();