From 3907224941f96e6a53b006ea91370a8116180199 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Wed, 8 Oct 2008 11:56:43 +0000 Subject: [PATCH] ebl Fix possible bug in cancel_job() with job that are not yet created. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7731 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/dird/job.c | 3 ++- bacula/technotes-2.5 | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bacula/src/dird/job.c b/bacula/src/dird/job.c index 106757514f..3f6c0a56a2 100644 --- a/bacula/src/dird/job.c +++ b/bacula/src/dird/job.c @@ -373,10 +373,11 @@ bool cancel_job(UAContext *ua, JCR *jcr) { BSOCK *sd, *fd; char ed1[50]; + int32_t old_status = jcr->JobStatus; set_jcr_job_status(jcr, JS_Canceled); - switch (jcr->JobStatus) { + switch (old_status) { case JS_Created: case JS_WaitJobRes: case JS_WaitClientRes: diff --git a/bacula/technotes-2.5 b/bacula/technotes-2.5 index 10ef3a00b7..2b9f64e00d 100644 --- a/bacula/technotes-2.5 +++ b/bacula/technotes-2.5 @@ -17,6 +17,9 @@ dbdriver remove reader/writer in FOPTS???? General: +08Oct08 +ebl Fix possible bug in cancel_job() with job that are not + yet created. 07Oct08 kes Fix bat build for Win32. 06Oct08 -- 2.39.2