From: Kern Sibbald Date: Wed, 1 Jul 2009 18:56:29 +0000 (+0000) Subject: Eliminate double job report when do_xxx_init() returns failure X-Git-Tag: Release-3.0.2~131 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1c18beb67d9caceced0ccfcafe9693f2edb72d0f;p=bacula%2Fbacula Eliminate double job report when do_xxx_init() returns failure git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8935 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/dird/job.c b/bacula/src/dird/job.c index 3b84fd98e9..dbca697b29 100644 --- a/bacula/src/dird/job.c +++ b/bacula/src/dird/job.c @@ -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"); diff --git a/bacula/technotes b/bacula/technotes index 99850567f5..2532fa2a1a 100644 --- a/bacula/technotes +++ b/bacula/technotes @@ -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.