From: Kern Sibbald Date: Wed, 17 Jun 2009 14:45:34 +0000 (+0000) Subject: Fix bug #1307 AllowHigherDuplicates=no prevents automatic job escalation X-Git-Tag: Release-3.0.2~162 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=25efae2ab5e472f3ca54c99b2ed731979ca6dcc2;p=bacula%2Fbacula Fix bug #1307 AllowHigherDuplicates=no prevents automatic job escalation git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8904 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/patches/3.0.1-higher-duplicates.patch b/bacula/patches/3.0.1-higher-duplicates.patch new file mode 100644 index 0000000000..65bbb71641 --- /dev/null +++ b/bacula/patches/3.0.1-higher-duplicates.patch @@ -0,0 +1,30 @@ + + This patch can be applied to version 3.0.1 and should + fix bug #1307 where a Job being escalated with + Allow Higher Duplicates = no is cancelled. + + Apply it to version 3.0.1 with: + + cd + patch -p0 <3.0.1-higher-duplicates.patch + ./configure + make + ... + make install + + + +Index: src/dird/job.c +=================================================================== +--- src/dird/job.c (revision 8902) ++++ src/dird/job.c (working copy) +@@ -672,6 +672,9 @@ + if (!job->AllowHigherDuplicates) { + foreach_jcr(djcr) { + char ec1[50]; ++ if (jcr == djcr) { ++ continue; /* do not cancel this job */ ++ } + if (strcmp(job->name(), djcr->job->name()) == 0) { + bool cancel_queued = false; + if (job->DuplicateJobProximity > 0) { diff --git a/bacula/src/dird/job.c b/bacula/src/dird/job.c index 08a99127dc..3b84fd98e9 100644 --- a/bacula/src/dird/job.c +++ b/bacula/src/dird/job.c @@ -672,6 +672,9 @@ bool allow_duplicate_job(JCR *jcr) if (!job->AllowHigherDuplicates) { foreach_jcr(djcr) { char ec1[50]; + if (jcr == djcr) { + continue; /* do not cancel this job */ + } if (strcmp(job->name(), djcr->job->name()) == 0) { bool cancel_queued = false; if (job->DuplicateJobProximity > 0) { diff --git a/bacula/technotes b/bacula/technotes index c6a992c0ae..b7c852392a 100644 --- a/bacula/technotes +++ b/bacula/technotes @@ -2,6 +2,8 @@ General: +17Jun09 +kes Fix bug #1307 AllowHigherDuplicates=no prevents automatic job escalation 12Jun09 kes Remove non-portable code referencing pthread_t fixes bug #1308. kes Create patch that may fix bug #1298 and bug #1304, which causes