From 4a029e74ea35341108eaa51b15523fdd0d9207f7 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Mon, 28 Apr 2003 13:53:36 +0000 Subject: [PATCH] Add cancel point in acquire_resources() + Documentation git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@465 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/dird/job.c | 6 ++++++ bacula/src/version.h | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/bacula/src/dird/job.c b/bacula/src/dird/job.c index 79ca09e870..139e88f714 100644 --- a/bacula/src/dird/job.c +++ b/bacula/src/dird/job.c @@ -279,6 +279,9 @@ static int acquire_resource_locks(JCR *jcr) jcr->sched_time - now); bmicrosleep(jcr->sched_time - now, 0); now = time(NULL); + if (job_canceled(jcr)) { + return 0; + } } @@ -338,6 +341,9 @@ static int acquire_resource_locks(JCR *jcr) break; wait: + if (job_canceled(jcr)) { + return 0; + } P(mutex); /* * Wait for a resource to be released either by backoff or diff --git a/bacula/src/version.h b/bacula/src/version.h index 6d893e7386..17f450a791 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -1,8 +1,8 @@ /* */ #define VERSION "1.30" #define VSTRING "1" -#define BDATE "24 April 2003" -#define LSMDATE "24Apr03" +#define BDATE "28 April 2003" +#define LSMDATE "28Apr03" /* Debug flags */ #define DEBUG 1 -- 2.39.5