]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/match_bsr.c
Use the command line utility dropdb instead of the psql command
[bacula/bacula] / bacula / src / stored / match_bsr.c
index 1aaef0e7552ac50a5524d343bacae2aedf05877f..79a5d78bccab3c5264ae65bf016a9f7e136df088 100755 (executable)
@@ -77,10 +77,16 @@ int match_bsr_block(BSR *bsr, DEV_BLOCK *block)
       return 1;                      /* cannot fast reject */
    }
 
-   if (!match_block_sesstime(bsr, bsr->sesstime, block)) {
-      return 0;
+   for ( ; bsr; bsr=bsr->next) {
+      if (!match_block_sesstime(bsr, bsr->sesstime, block)) {
+        continue;
+      }
+      if (!match_block_sessid(bsr, bsr->sessid, block)) {
+        continue;
+      }
+      return 1;
    }
-   return match_block_sessid(bsr, bsr->sessid, block);
+   return 0;
 }
 
 static int match_block_sesstime(BSR *bsr, BSR_SESSTIME *sesstime, DEV_BLOCK *block)
@@ -440,7 +446,7 @@ static int match_volfile(BSR *bsr, BSR_VOLFILE *volfile, DEV_RECORD *rec, bool d
    if (!(rec->state & REC_ISTAPE)) {
       return 1;                      /* All File records OK for this match */
    }
-// Dmsg3(000, "match_volfile: sfile=%d efile=%d recfile=%d\n",
+// Dmsg3(100, "match_volfile: sfile=%d efile=%d recfile=%d\n",
 //            volfile->sfile, volfile->efile, rec->File);
    if (volfile->sfile <= rec->File && volfile->efile >= rec->File) {
       return 1;