servlib/bundling/BPQBlock.cc
changeset 43 721d4a13bd0b
parent 42 6e7559bfcb52
child 44 c4b3e13a1a90
equal deleted inserted replaced
42:6e7559bfcb52 43:721d4a13bd0b
   188     u_char* buf = 0;
   188     u_char* buf = 0;
   189  
   189  
   190 /////////////////////////////////////////////////////
   190 /////////////////////////////////////////////////////
   191     ASSERT ( block != NULL );
   191     ASSERT ( block != NULL );
   192 //    ASSERT ( block->data() != NULL );
   192 //    ASSERT ( block->data() != NULL );
   193     // BPQ Kind must be 0 or 1
       
   194     if ( *(block->data()) != 0 &&
       
   195          *(block->data()) != 1 ) {
       
   196         log_err_p(LOG, "BPQBlock::initialise: block->data() = %c(should be 0|1)",
       
   197             *(block->data()));
       
   198     }
       
   199 
   193 
   200     log_debug_p(LOG, "BPQBlock::initialise: block != NULL");
   194     log_debug_p(LOG, "BPQBlock::initialise: block != NULL");
   201     log_debug_p(LOG, "BPQBlock::initialise: block->data() != NULL"); 
   195     log_debug_p(LOG, "BPQBlock::initialise: block->data() != NULL"); 
   202 
   196 
   203     log_debug_p(LOG, "BPQBlock::initialise: data_length() = %d", block->data_length());
   197     log_debug_p(LOG, "BPQBlock::initialise: data_length() = %d", block->data_length());
   226     }
   220     }
   227 
   221 
   228     log_debug_p(LOG, "BPQBlock::initialise: extracting buf");
   222     log_debug_p(LOG, "BPQBlock::initialise: extracting buf");
   229     buf = block->data();
   223     buf = block->data();
   230 
   224 
       
   225     // BPQ Kind must be 0 or 1
       
   226     if ( *(block->data()) != 0 &&
       
   227          *(block->data()) != 1 ) {
       
   228         log_err_p(LOG, "BPQBlock::initialise: block->data() = %c(should be 0|1)",
       
   229             *(block->data()));
       
   230     }
       
   231 
   231     // BPQ-kind             1-byte
   232     // BPQ-kind             1-byte
   232     if ( i < len ) {
   233     if ( i < len ) {
   233         log_debug_p(LOG, "BPQBlock::initialise: extracting kind");
   234         log_debug_p(LOG, "BPQBlock::initialise: extracting kind");
   234         kind_ = (kind_t) buf[i++];
   235         kind_ = (kind_t) buf[i++];
   235         log_debug_p(LOG, "BPQBlock::initialise: kind = %d", kind_);
   236         log_debug_p(LOG, "BPQBlock::initialise: kind = %d", kind_);