X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fstored%2Fjob.c;h=431071c582e0dc321414fabbad707ea26f9c5f97;hb=706490171cd2e5458defa3e4abfeca745d19d1f3;hp=3d9765091850a59096fd97f7823374beabe0a5fa;hpb=217e5ed47147cd420ed0799a96868a561bfd6b57;p=bacula%2Fbacula diff --git a/bacula/src/stored/job.c b/bacula/src/stored/job.c index 3d97650918..431071c582 100644 --- a/bacula/src/stored/job.c +++ b/bacula/src/stored/job.c @@ -134,8 +134,8 @@ bool job_cmd(JCR *jcr) unbash_spaces(fileset_name); jcr->fileset_name = get_pool_memory(PM_NAME); pm_strcpy(jcr->fileset_name, fileset_name); - jcr->JobType = JobType; - jcr->JobLevel = level; + jcr->set_JobType(JobType); + jcr->set_JobLevel(level); jcr->no_attributes = no_attributes; jcr->spool_attributes = spool_attributes; jcr->spool_data = spool_data; @@ -146,6 +146,7 @@ bool job_cmd(JCR *jcr) jcr->PreferMountedVols = PreferMountedVols; jcr->authenticated = false; + jcr->need_fd = true; /* * Pass back an authorization key for the File daemon @@ -169,12 +170,11 @@ bool run_cmd(JCR *jcr) Dsm_check(1); Dmsg1(200, "Run_cmd: %s\n", jcr->dir_bsock->msg); - /* The following jobs don't need the FD */ - switch (jcr->JobType) { - case JT_COPY: - case JT_MIGRATE: - case JT_ARCHIVE: - jcr->authenticated = true; + + /* If we do not need the FD, we are doing a migrate, copy, or virtual + * backup. + */ + if (!jcr->need_fd) { do_mac(jcr); return false; }