From: Eric Bollengier Date: Wed, 5 Aug 2020 08:51:34 +0000 (+0200) Subject: Fix restore issue in community version reported by big-vol-test X-Git-Tag: Release-11.3.2~1322 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=449666ea9bd29d9778d80b053fd5af7315fd03a4;p=thirdparty%2Fbacula.git Fix restore issue in community version reported by big-vol-test --- diff --git a/bacula/src/stored/org_libsd_sir.c b/bacula/src/stored/org_libsd_sir.c index ea57f3d89a..ad50348784 100644 --- a/bacula/src/stored/org_libsd_sir.c +++ b/bacula/src/stored/org_libsd_sir.c @@ -20,8 +20,9 @@ #include "bacula.h" #include "stored.h" -void sir_init(DCR *dcr) +bool sir_init(DCR *dcr) { + return false; } /* Return: SIR_OK nothing to do diff --git a/bacula/src/stored/protos.h b/bacula/src/stored/protos.h index b5867705c8..714a3145de 100644 --- a/bacula/src/stored/protos.h +++ b/bacula/src/stored/protos.h @@ -341,7 +341,7 @@ int sir_init_loop(DCR *dcr, bool record_cb(DCR *dcr, DEV_RECORD *rec), bool mount_cb(DCR *dcr)); -void sir_init(DCR *dcr); +bool sir_init(DCR *dcr); /* from BEE */ #if BEEF diff --git a/bacula/src/stored/read_records.c b/bacula/src/stored/read_records.c index e5d3c11647..d76aff35e5 100644 --- a/bacula/src/stored/read_records.c +++ b/bacula/src/stored/read_records.c @@ -120,7 +120,13 @@ bool read_records(DCR *dcr, recs = New(dlist(rec, &rec->link)); - sir_init(dcr); + if (!sir_init(dcr)) { + /* We go to the first_file unless we need to reposition during an + * interactive restore session (the reposition will be done with a different + * BSR in the for loop + */ + position_to_first_file(jcr, dcr, jcr->bsr); + } jcr->mount_next_volume = false;