From: Eric Bollengier Date: Sat, 17 Apr 2010 12:29:02 +0000 (+0200) Subject: Use a dedicated connexion when VirtualFull computes the file list. X-Git-Tag: Release-7.0.0~1928 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=22ec304a9ac3f6a3eedde8a4c930c949d06ac94b;p=bacula%2Fbacula Use a dedicated connexion when VirtualFull computes the file list. --- 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;