From: Kern Sibbald Date: Sun, 10 Jun 2012 07:42:41 +0000 (+0200) Subject: Ensure cancel status is set for canceled duplicate jobs -- partial fix for bug #1851 X-Git-Tag: Release-7.0.0~192 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2fa3446c2091cbe1a16021ace75c2ea00b746d4b;p=bacula%2Fbacula Ensure cancel status is set for canceled duplicate jobs -- partial fix for bug #1851 --- diff --git a/bacula/src/dird/job.c b/bacula/src/dird/job.c index f769d20881..dae019bc7c 100644 --- a/bacula/src/dird/job.c +++ b/bacula/src/dird/job.c @@ -762,6 +762,7 @@ bool allow_duplicate_job(JCR *jcr) */ if (cancel_me) { /* Zap current job */ + jcr->setJobStatus(JS_Canceled); Jmsg(jcr, M_FATAL, 0, _("JobId %d already running. Duplicate job not allowed.\n"), djcr->JobId); break; /* get out of foreach_jcr */ @@ -796,6 +797,7 @@ bool allow_duplicate_job(JCR *jcr) Jmsg(jcr, M_INFO, 0, _("Cancelling duplicate JobId=%d.\n"), djcr->JobId); cancel_job(ua, djcr); bmicrosleep(0, 500000); + djcr->setJobStatus(JS_Canceled); cancel_job(ua, djcr); free_ua_context(ua); Dmsg2(800, "Cancel dup %p JobId=%d\n", djcr, djcr->JobId); @@ -803,6 +805,7 @@ bool allow_duplicate_job(JCR *jcr) /* * Zap current job */ + jcr->setJobStatus(JS_Canceled); Jmsg(jcr, M_FATAL, 0, _("JobId %d already running. Duplicate job not allowed.\n"), djcr->JobId); Dmsg2(800, "Cancel me %p JobId=%d\n", jcr, jcr->JobId);