]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix bug #1307 AllowHigherDuplicates=no prevents automatic job escalation
authorKern Sibbald <kern@sibbald.com>
Wed, 17 Jun 2009 14:45:34 +0000 (14:45 +0000)
committerKern Sibbald <kern@sibbald.com>
Wed, 17 Jun 2009 14:45:34 +0000 (14:45 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8904 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/patches/3.0.1-higher-duplicates.patch [new file with mode: 0644]
bacula/src/dird/job.c
bacula/technotes

diff --git a/bacula/patches/3.0.1-higher-duplicates.patch b/bacula/patches/3.0.1-higher-duplicates.patch
new file mode 100644 (file)
index 0000000..65bbb71
--- /dev/null
@@ -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 <bacula-source>
+ patch -p0 <3.0.1-higher-duplicates.patch
+ ./configure <your-options>
+ 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) {
index 08a99127dcda0f3493c2ef2b76e0bb0c22687814..3b84fd98e9f7646cfb2fb2427f8bb0f497ad21c8 100644 (file)
@@ -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) {
index c6a992c0aec25b183ba5059281c28354464bd64d..b7c852392ac55858b5a24c2ea604649fc5fb46ea 100644 (file)
@@ -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