]> git.sur5r.net Git - bacula/bacula/commitdiff
Eliminate double job report when do_xxx_init() returns failure
authorKern Sibbald <kern@sibbald.com>
Wed, 1 Jul 2009 18:56:29 +0000 (18:56 +0000)
committerKern Sibbald <kern@sibbald.com>
Wed, 1 Jul 2009 18:56:29 +0000 (18:56 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8935 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/dird/job.c
bacula/technotes

index 3b84fd98e9f7646cfb2fb2427f8bb0f497ad21c8..dbca697b2965cfc65efbdaacf8d02df1725210ac 100644 (file)
@@ -200,33 +200,38 @@ bool setup_job(JCR *jcr)
    case JT_BACKUP:
       if (!do_backup_init(jcr)) {
          backup_cleanup(jcr, JS_ErrorTerminated);
+         goto bail_out;
       }
       break;
    case JT_VERIFY:
       if (!do_verify_init(jcr)) {
          verify_cleanup(jcr, JS_ErrorTerminated);
+         goto bail_out;
       }
       break;
    case JT_RESTORE:
       if (!do_restore_init(jcr)) {
          restore_cleanup(jcr, JS_ErrorTerminated);
+         goto bail_out;
       }
       break;
    case JT_ADMIN:
       if (!do_admin_init(jcr)) {
          admin_cleanup(jcr, JS_ErrorTerminated);
+         goto bail_out;
       }
       break;
    case JT_COPY:
    case JT_MIGRATE:
       if (!do_migration_init(jcr)) { 
          migration_cleanup(jcr, JS_ErrorTerminated);
+         goto bail_out;
       }
       break;
    default:
       Pmsg1(0, _("Unimplemented job type: %d\n"), jcr->get_JobType());
       set_jcr_job_status(jcr, JS_ErrorTerminated);
-      break;
+      goto bail_out;
    }
 
    generate_job_event(jcr, "JobInit");
index 99850567f5507208fff90287ed28225501fdaf52..2532fa2a1ab47da5d16dbf93a5d91d6ae384d713 100644 (file)
@@ -3,6 +3,7 @@
 General:
 
 01Jul09
+kes  Eliminate double job report when do_xxx_init() returns failure
 kes  Add debug code to MaxDiffInterval
 29Jun09
 kes  Change bacula-dir.conf default job name from Client1 to BackupClient1.