servlib/bundling/BPQBlock.cc
changeset 68 17b33ba237f2
parent 66 e1101c5d54a1
child 75 d647d52028bc
equal deleted inserted replaced
67:cfe2328ba1c6 68:17b33ba237f2
    38         has_block(BundleProtocol::QUERY_EXTENSION_BLOCK) ) {
    38         has_block(BundleProtocol::QUERY_EXTENSION_BLOCK) ) {
    39 
    39 
    40         log_debug("BPQBlock found in Recv Block Vec => created remotely");
    40         log_debug("BPQBlock found in Recv Block Vec => created remotely");
    41         initialise( const_cast<BlockInfo*> (bundle->recv_blocks().
    41         initialise( const_cast<BlockInfo*> (bundle->recv_blocks().
    42                     find_block(BundleProtocol::QUERY_EXTENSION_BLOCK)),
    42                     find_block(BundleProtocol::QUERY_EXTENSION_BLOCK)),
    43         			true, bundle);
    43         			false, bundle);
    44 
    44 
    45     } else if( const_cast<Bundle*>(bundle)->api_blocks()->
    45     } else if( const_cast<Bundle*>(bundle)->api_blocks()->
    46                has_block(BundleProtocol::QUERY_EXTENSION_BLOCK) ) {
    46                has_block(BundleProtocol::QUERY_EXTENSION_BLOCK) ) {
    47 
    47 
    48         log_debug("BPQBlock found in API Block Vec => created locally");
    48         log_debug("BPQBlock found in API Block Vec => created locally");
   319 //----------------------------------------------------------------------
   319 //----------------------------------------------------------------------
   320 int
   320 int
   321 BPQBlock::extract_matching_rule (const u_char* buf, u_int* buf_index, u_int buf_length)
   321 BPQBlock::extract_matching_rule (const u_char* buf, u_int* buf_index, u_int buf_length)
   322 {
   322 {
   323 	if ( *buf_index < buf_length ) {
   323 	if ( *buf_index < buf_length ) {
   324 	    matching_rule_ = (kind_t) buf[(*buf_index)++];
   324 	    matching_rule_ = (u_int) buf[(*buf_index)++];
   325 	    log_debug("BPQBlock::extract_matching_rule: matching rule = %d", matching_rule_);
   325 	    log_debug("BPQBlock::extract_matching_rule: matching rule = %d", matching_rule_);
   326 	    return BP_SUCCESS;
   326 	    return BP_SUCCESS;
   327 
   327 
   328 	} else {
   328 	} else {
   329 	    log_err("Error decoding matching rule");
   329 	    log_err("Error decoding matching rule");