]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Fix restore issue in community version reported by big-vol-test
authorEric Bollengier <eric@baculasystems.com>
Wed, 5 Aug 2020 08:51:34 +0000 (10:51 +0200)
committerEric Bollengier <eric@baculasystems.com>
Tue, 1 Mar 2022 14:36:17 +0000 (15:36 +0100)
bacula/src/stored/org_libsd_sir.c
bacula/src/stored/protos.h
bacula/src/stored/read_records.c

index ea57f3d89a2e2a925afff661432e91f965355051..ad5034878432e58965a317d5e18f111fcd4eb57d 100644 (file)
@@ -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
index b5867705c89bae466c17f5878756a885469d432d..714a3145ded14ae96dd1ac021cb319eb24615c69 100644 (file)
@@ -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
index e5d3c1164788e1b3f8a5fddb25b1cb0c0dc59ef0..d76aff35e5f263aff771f1c73633bb4d6a9166d9 100644 (file)
@@ -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;