servlib/bundling/BundleDaemon.cc
changeset 15 65e62bd13efd
parent 14 06512deddac4
child 22 3c36683e13be
equal deleted inserted replaced
14:06512deddac4 15:65e62bd13efd
   455         log_info("accept_bpq_response: add new response to cache - Query: %s",
   455         log_info("accept_bpq_response: add new response to cache - Query: %s",
   456                  (char*)bpq_block->query_val());
   456                  (char*)bpq_block->query_val());
   457 
   457 
   458         // add bundle to cache and store
   458         // add bundle to cache and store
   459         bundle->set_in_bpq_cache(true);
   459         bundle->set_in_bpq_cache(true);
       
   460 
       
   461         /**********************************************
       
   462         // DEBUG Code - remove
       
   463 
       
   464         if (bundle->recv_blocks().has_block(1)) {
       
   465             BlockInfo* payload = const_cast<BlockInfo*> 
       
   466                                  (bundle->recv_blocks().find_block(1));
       
   467     
       
   468             size_t length = payload->data_length();
       
   469             size_t offset = payload->data_offset();
       
   470             size_t buf_len = payload->writable_contents()->buf_len();
       
   471 
       
   472             log_info("payload->data_length(): %d", payload->data_length());
       
   473             log_info("payload->data_offset(): %d", payload->data_offset());
       
   474             log_info("payload->full_length(): %d", payload->full_length());
       
   475             log_info("payload->writable_contents()->buf_len(): %d",
       
   476                       payload->writable_contents()->buf_len());
       
   477 
       
   478             ASSERT (buf_len >= length + offset);
       
   479             
       
   480             memset(payload->writable_contents()->buf() + offset,
       
   481                    0, length);
       
   482         }
       
   483         **********************************************/
   460         bpq_bundles_->push_back(bundle);
   484         bpq_bundles_->push_back(bundle);
   461 
   485 
   462         if (add_to_store) {
   486         if (add_to_store) {
   463             bundle->set_in_datastore(true);
   487             bundle->set_in_datastore(true);
   464             actions_->store_add(bundle);
   488             actions_->store_add(bundle);