]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/job.c
ebl Use a dedicate DB link to compute and send the accurate list
[bacula/bacula] / bacula / src / dird / job.c
index 2224bc9939a9902157f59f81a87e3302caf04745..106757514f216d1917b0828a9c5d72971cf87a5b 100644 (file)
@@ -972,10 +972,11 @@ void dird_free_jcr(JCR *jcr)
       pthread_cond_destroy(&jcr->term_wait);
       jcr->term_wait_inited = false;
    }
-   if (jcr->db_batch && jcr->db_batch != jcr->db) {
+   if (jcr->db_batch) {
       db_close_database(jcr, jcr->db_batch);
+      jcr->db_batch = NULL;
+      jcr->batch_started = false;
    }
-   jcr->db_batch = NULL;
    if (jcr->db) {
       db_close_database(jcr, jcr->db);
       jcr->db = NULL;