]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix #1926 about wrong duplicate job detection with Copy/Migration and Backup jobs
authorEric Bollengier <eric@baculasystems.com>
Wed, 6 Jul 2016 12:03:25 +0000 (14:03 +0200)
committerKern Sibbald <kern@sibbald.com>
Wed, 6 Jul 2016 18:50:40 +0000 (20:50 +0200)
bacula/src/dird/job.c

index 3193741555f91d386d2fff95dd2822c66e5cbeda..7558d362d71f3a26022cc9d7edc4b6087bbfbb52 100644 (file)
@@ -1011,7 +1011,9 @@ bool allow_duplicate_job(JCR *jcr)
       if (djcr->IgnoreDuplicateJobChecking) {
          continue; 
       } 
-      if (strcmp(job->name(), djcr->job->name()) == 0) {
+      if ((strcmp(job->name(), djcr->job->name()) == 0) &&
+          djcr->getJobType() == jcr->getJobType()) /* A duplicate is about the same name and the same type */
+      {
          bool cancel_dup = false;
          bool cancel_me = false;
          if (job->DuplicateJobProximity > 0) {