]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/ua_status.c
ebl Modify disk-changer to check if slot contains something before
[bacula/bacula] / bacula / src / dird / ua_status.c
index 92b3eba8537ad546c51d2f3b44b07a409ce47b3e..612dff9bf502dd3c2b9b8bc94a855a967d6f6950 100644 (file)
@@ -432,7 +432,9 @@ static void prt_runtime(UAContext *ua, sched_pkt *sp)
    bool close_db = false;
    JCR *jcr = ua->jcr;
    MEDIA_DBR mr;
+   int orig_jobtype;
 
+   orig_jobtype = jcr->JobType;
    memset(&mr, 0, sizeof(mr));
    if (sp->job->JobType == JT_BACKUP) {
       jcr->db = NULL;
@@ -475,6 +477,7 @@ static void prt_runtime(UAContext *ua, sched_pkt *sp)
       db_close_database(jcr, jcr->db);
    }
    jcr->db = ua->db;                  /* restore ua db to jcr */
+   jcr->JobType = orig_jobtype;
 }
 
 /*