bareos: bareos-15.2 f8987a8c

Author Committer Branch Timestamp Parent
mvwieringen mvwieringen bareos-15.2 2015-10-26 19:51 bareos-15.2 bd1b2414 Pending
Affected Issues  0000544: Director crash (SIGSEGV 11) when migrating an empty job in version 15.2.1
Changeset Fix Director crash when migrating an empty job

When there is nothing to do for a Migration or Copy the migration_init()
function sets the Job exit code already to JS_Terminated. This patch
checks after the migration_init() if the Job Status is alread
JS_Terminated and then call migration_cleanup() directly.

I also added an explicit check in do_actual_migration() that we have a
mig_jcr setup as the rest of the code expect this to be set and for any
Migration or Copy Job that needs to do some actual work this must also
be set so the extra check is mostly to make sure it is.

The printing of the New JobId is also fixed to show *None* instead of
<NULL>.

Fixes 0000544: Director crash (SIGSEGV 11) when migrating an empty job
mod - src/dird/job.c Diff File
mod - src/dird/migrate.c Diff File