src/stored/match_bsr.c
static int match_findex(BSR *bsr, DEV_RECORD *rec, bool done)
{
   BSR_FINDEX *findex = bsr->FileIndex;
   BSR_FINDEX *next;

   if (!findex) {
      return 1;                       /* no specification matches all */
   }

   for ( ;; ) {
      if (findex->findex <= rec->FileIndex && findex->findex2 >= rec->FileIndex) {
         Dmsg3(dbglevel, "Match on recFindex=%d. bsrFIs=%d,%d\n",
               rec->FileIndex, findex->findex, findex->findex2);
         return 1;
      }
      if (rec->FileIndex > findex->findex2) {
         /* TODO: See if we really want to modify the findex when we will try
          * to seek backward */
         if (findex->next) {
            next = findex->next;
            Dmsg3(dbglevel, "No match recFindex=%d. bsrFIs=%d,%d\n",
               rec->FileIndex, findex->findex, findex->findex2);
            free(findex);
            findex = next;
            bsr->FileIndex = findex;
            continue;
         } else {
            bsr->done = true;
            bsr->root->reposition = true;
         }
      }
      return 0;
   }
}
/*
 * When reading the Volume, the Volume Findex (rec->FileIndex) always
 *   are found in sequential order. Thus we can make optimizations.
 *
 */
When reading the Volume, the Volume Findex (rec->FileIndex) always
are found in sequential order. Thus we can make optimizations.
When reading the Volume the Volume Findex ( rec - > FileIndex ) always are found in sequential order . Thus we can make optimizations .
static int match_findex(BSR *bsr, DEV_RECORD *rec, bool done)
{
   BSR_FINDEX *findex = bsr->FileIndex;
   BSR_FINDEX *next;
   if (!findex) {
      return 1;                       
   }
   for ( ;; ) {
      if (findex->findex <= rec->FileIndex && findex->findex2 >= rec->FileIndex) {
         Dmsg3(dbglevel, "Match on recFindex=%d. bsrFIs=%d,%d\n",
               rec->FileIndex, findex->findex, findex->findex2);
         return 1;
      }
      if (rec->FileIndex > findex->findex2) {
         if (findex->next) {
            next = findex->next;
            Dmsg3(dbglevel, "No match recFindex=%d. bsrFIs=%d,%d\n",
               rec->FileIndex, findex->findex, findex->findex2);
            free(findex);
            findex = next;
            bsr->FileIndex = findex;
            continue;
         } else {
            bsr->done = true;
            bsr->root->reposition = true;
         }
      }
      return 0;
   }
}
static int match_findex ( BSR * bsr , DEV_RECORD * rec , bool done ) { BSR_FINDEX * findex = bsr -> FileIndex ; BSR_FINDEX * next ; if ( ! findex ) { return 1 ; } for ( ; ; ) { if ( findex -> findex <= rec -> FileIndex && findex -> findex2 >= rec -> FileIndex ) { Dmsg3 ( dbglevel , " \n " , rec -> FileIndex , findex -> findex , findex -> findex2 ) ; return 1 ; } if ( rec -> FileIndex > findex -> findex2 ) { if ( findex -> next ) { next = findex -> next ; Dmsg3 ( dbglevel , " \n " , rec -> FileIndex , findex -> findex , findex -> findex2 ) ; free ( findex ) ; findex = next ; bsr -> FileIndex = findex ; continue ; } else { bsr -> done = true ; bsr -> root -> reposition = true ; } } return 0 ; } }
When reading the Volume, the Volume Findex (rec->FileIndex) always
   are found in sequential order.
When reading the Volume the Volume Findex ( rec - > FileIndex ) always are found in sequential order .
/* no specification matches all */ /* TODO: See if we really want to modify the findex when we will try
          * to seek backward */