]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/job.c
kes Another try at fixing Vbackup. It looks much better this time.
[bacula/bacula] / bacula / src / stored / job.c
index 3d9765091850a59096fd97f7823374beabe0a5fa..431071c582e0dc321414fabbad707ea26f9c5f97 100644 (file)
@@ -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;
    }