From c7ea6ad91079c8ba44ee9ec61d61fec45cc10db3 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Sat, 17 Apr 2010 14:29:02 +0200 Subject: [PATCH] Use a dedicated connexion when VirtualFull computes the file list. --- bacula/src/dird/vbackup.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/bacula/src/dird/vbackup.c b/bacula/src/dird/vbackup.c index 75869419d3..a171fd2042 100644 --- a/bacula/src/dird/vbackup.c +++ b/bacula/src/dird/vbackup.c @@ -478,8 +478,15 @@ static bool create_bootstrap_file(JCR *jcr, char *jobids) #define new_get_file_list #ifdef new_get_file_list - if (!db_get_file_list(jcr, ua->db, jobids, insert_bootstrap_handler, (void *)rx.bsr)) { - Jmsg(jcr, M_ERROR, 0, "%s", db_strerror(ua->db)); + if (!db_open_batch_connexion(jcr, jcr->db)) { + Jmsg0(jcr, M_FATAL, 0, "Can't get batch sql connexion"); + return false; + } + + if (!db_get_file_list(jcr, jcr->db_batch, jobids, + insert_bootstrap_handler, (void *)rx.bsr)) + { + Jmsg(jcr, M_ERROR, 0, "%s", db_strerror(jcr->db_batch)); } #else char *p; -- 2.39.5