src/dird/backup.c
static bool is_checksum_needed_by_fileset(JCR *jcr)
{
   FILESET *f;
   INCEXE *inc;
   FOPTS *fopts;
   bool in_block=false;
   bool have_basejob_option=false;
   if (!jcr->job || !jcr->job->fileset) {
      return false;
   }

   f = jcr->job->fileset;

   for (int i=0; i < f->num_includes; i++) { /* Parse all Include {} */
      inc = f->include_items[i];

      for (int j=0; j < inc->num_opts; j++) { /* Parse all Options {} */
         fopts = inc->opts_list[j];

         for (char *k=fopts->opts; *k ; k++) { /* Try to find one request */
            switch (*k) {
            case 'V':           /* verify */
               in_block = (jcr->getJobType() == JT_VERIFY); /* not used now */
               break;
            case 'J':           /* Basejob keyword */
               have_basejob_option = in_block = jcr->HasBase;
               break;
            case 'C':           /* Accurate keyword */
               in_block = !jcr->is_JobLevel(L_FULL);
               break;
            case ':':           /* End of keyword */
               in_block = false;
               break;
            case '5':           /* MD5  */
            case '1':           /* SHA1 */
               if (in_block) {
                  Dmsg0(50, "Checksum will be sent to FD\n");
                  return true;
               }
               break;
            default:
               break;
            }
         }
      }
   }

   /* By default for BaseJobs, we send the checksum */
   if (!have_basejob_option && jcr->HasBase) {
      return true;
   }

   Dmsg0(50, "Checksum will be sent to FD\n");
   return false;
}
/* In this procedure, we check if the current fileset is using checksum
 * FileSet-> Include-> Options-> Accurate/Verify/BaseJob=checksum
 * This procedure uses jcr->HasBase, so it must be call after the initialization
 */
In this procedure, we check if the current fileset is using checksum
FileSet-> Include-> Options-> Accurate/Verify/BaseJob=checksum
This procedure uses jcr->HasBase, so it must be call after the initialization
In this procedure we check if the current fileset is using checksum FileSet - > Include - > Options - > Accurate / Verify / BaseJob = checksum This procedure uses jcr - > HasBase so it must be call after the initialization
static bool is_checksum_needed_by_fileset(JCR *jcr)
{
   FILESET *f;
   INCEXE *inc;
   FOPTS *fopts;
   bool in_block=false;
   bool have_basejob_option=false;
   if (!jcr->job || !jcr->job->fileset) {
      return false;
   }
   f = jcr->job->fileset;
   for (int i=0; i < f->num_includes; i++) { 
      inc = f->include_items[i];
      for (int j=0; j < inc->num_opts; j++) { 
         fopts = inc->opts_list[j];
         for (char *k=fopts->opts; *k ; k++) { 
            switch (*k) {
            case 'V':           
               in_block = (jcr->getJobType() == JT_VERIFY); 
               break;
            case 'J':           
               have_basejob_option = in_block = jcr->HasBase;
               break;
            case 'C':           
               in_block = !jcr->is_JobLevel(L_FULL);
               break;
            case ':':           
               in_block = false;
               break;
            case '5':           
            case '1':           
               if (in_block) {
                  Dmsg0(50, "Checksum will be sent to FD\n");
                  return true;
               }
               break;
            default:
               break;
            }
         }
      }
   }
   if (!have_basejob_option && jcr->HasBase) {
      return true;
   }
   Dmsg0(50, "Checksum will be sent to FD\n");
   return false;
}
static bool is_checksum_needed_by_fileset ( JCR * jcr ) { FILESET * f ; INCEXE * inc ; FOPTS * fopts ; bool in_block = false ; bool have_basejob_option = false ; if ( ! jcr -> job || ! jcr -> job -> fileset ) { return false ; } f = jcr -> job -> fileset ; for ( int i = 0 ; i < f -> num_includes ; i ++ ) { inc = f -> include_items [ i ] ; for ( int j = 0 ; j < inc -> num_opts ; j ++ ) { fopts = inc -> opts_list [ j ] ; for ( char * k = fopts -> opts ; * k ; k ++ ) { switch ( * k ) { case ' ' : in_block = ( jcr -> getJobType ( ) == JT_VERIFY ) ; break ; case ' ' : have_basejob_option = in_block = jcr -> HasBase ; break ; case ' ' : in_block = ! jcr -> is_JobLevel ( L_FULL ) ; break ; case ' ' : in_block = false ; break ; case ' ' : case ' ' : if ( in_block ) { Dmsg0 ( 50 , " \n " ) ; return true ; } break ; default : break ; } } } } if ( ! have_basejob_option && jcr -> HasBase ) { return true ; } Dmsg0 ( 50 , " \n " ) ; return false ; }
In this procedure, we check if the current fileset is using checksum
 FileSet-> Include-> Options-> Accurate/Verify/BaseJob=checksum
 This procedure uses jcr->HasBase, so it must be call after the initialization
In this procedure we check if the current fileset is using checksum FileSet - > Include - > Options - > Accurate / Verify / BaseJob = checksum This procedure uses jcr - > HasBase so it must be call after the initialization
/* Parse all Include {} */ /* Parse all Options {} */ /* Try to find one request */ /* verify */ /* not used now */ /* Basejob keyword */ /* Accurate keyword */ /* End of keyword */ /* MD5  */ /* SHA1 */ /* By default for BaseJobs, we send the checksum */