src/stored/match_bsr.c
bool is_this_bsr_done(JCR *jcr, BSR *bsr, DEV_RECORD *rec)
{
   BSR *rbsr = rec->bsr;
   Dmsg1(dbglevel, "match_set %d\n", rbsr != NULL);
   if (!rbsr) {
      return false;
   }
   rec->bsr = NULL;

   /* TODO: When the new code is stable, drop the else part */
   if (jcr->use_new_match_all) {
      if (!rbsr->next) {
         rbsr->found++;
      }
      /* Normally the loop must stop only *after* the last record has been read,
       * and we are about to read the next record.
       */
      if (rbsr->count && rbsr->found > rbsr->count) {
         rbsr->done = true;
         rbsr->root->reposition = true;
         Dmsg2(dbglevel, "is_end_this_bsr set reposition=1 count=%d found=%d\n",
               rbsr->count, rbsr->found);
         return true;
      }

   } else {
      /* Old code that is stable */
      rbsr->found++;

      if (rbsr->count && rbsr->found >= rbsr->count) {
         rbsr->done = true;
         rbsr->root->reposition = true;
         Dmsg2(dbglevel, "is_end_this_bsr set reposition=1 count=%d found=%d\n",
               rbsr->count, rbsr->found);
         return true;
      }
   }
   Dmsg2(dbglevel, "is_end_this_bsr not done count=%d found=%d\n",
        rbsr->count, rbsr->found);
   return false;
}
/*
 * Called after the signature record so that
 *   we can see if the current bsr has been
 *   fully processed (i.e. is done).
 *  The bsr argument is not used, but is included
 *    for consistency with the other match calls.
 *
 * Returns: true if we should reposition
 *        : false otherwise.
 */
Called after the signature record so that
we can see if the current bsr has been
fully processed .
The bsr argument is not used, but is included
for consistency with the other match calls.

true if we should reposition
: false otherwise.
Called after the signature record so that we can see if the current bsr has been fully processed . The bsr argument is not used but is included for consistency with the other match calls . true if we should reposition : false otherwise .
bool is_this_bsr_done(JCR *jcr, BSR *bsr, DEV_RECORD *rec)
{
   BSR *rbsr = rec->bsr;
   Dmsg1(dbglevel, "match_set %d\n", rbsr != NULL);
   if (!rbsr) {
      return false;
   }
   rec->bsr = NULL;
   if (jcr->use_new_match_all) {
      if (!rbsr->next) {
         rbsr->found++;
      }
      if (rbsr->count && rbsr->found > rbsr->count) {
         rbsr->done = true;
         rbsr->root->reposition = true;
         Dmsg2(dbglevel, "is_end_this_bsr set reposition=1 count=%d found=%d\n",
               rbsr->count, rbsr->found);
         return true;
      }
   } else {
      rbsr->found++;
      if (rbsr->count && rbsr->found >= rbsr->count) {
         rbsr->done = true;
         rbsr->root->reposition = true;
         Dmsg2(dbglevel, "is_end_this_bsr set reposition=1 count=%d found=%d\n",
               rbsr->count, rbsr->found);
         return true;
      }
   }
   Dmsg2(dbglevel, "is_end_this_bsr not done count=%d found=%d\n",
        rbsr->count, rbsr->found);
   return false;
}
bool is_this_bsr_done ( JCR * jcr , BSR * bsr , DEV_RECORD * rec ) { BSR * rbsr = rec -> bsr ; Dmsg1 ( dbglevel , " \n " , rbsr != NULL ) ; if ( ! rbsr ) { return false ; } rec -> bsr = NULL ; if ( jcr -> use_new_match_all ) { if ( ! rbsr -> next ) { rbsr -> found ++ ; } if ( rbsr -> count && rbsr -> found > rbsr -> count ) { rbsr -> done = true ; rbsr -> root -> reposition = true ; Dmsg2 ( dbglevel , " \n " , rbsr -> count , rbsr -> found ) ; return true ; } } else { rbsr -> found ++ ; if ( rbsr -> count && rbsr -> found >= rbsr -> count ) { rbsr -> done = true ; rbsr -> root -> reposition = true ; Dmsg2 ( dbglevel , " \n " , rbsr -> count , rbsr -> found ) ; return true ; } } Dmsg2 ( dbglevel , " \n " , rbsr -> count , rbsr -> found ) ; return false ; }
Called after the signature record so that
   we can see if the current bsr has been
   fully processed (i.e.
Called after the signature record so that we can see if the current bsr has been fully processed ( i . e .
/* TODO: When the new code is stable, drop the else part */ /* Normally the loop must stop only *after* the last record has been read,
       * and we are about to read the next record.
       */ /* Old code that is stable */