servlib/bundling/BundleDaemon.cc
changeset 62 935bf9f13cfc
parent 61 166a3782491c
child 64 1296a0283271
equal deleted inserted replaced
61:166a3782491c 62:935bf9f13cfc
  2685     	if (bpq_cache()->answer_query(bundle, &bpq_block)) {
  2685     	if (bpq_cache()->answer_query(bundle, &bpq_block)) {
  2686     		log_info_p("/dtn/daemon/bpq", "Query: %s answered completely",
  2686     		log_info_p("/dtn/daemon/bpq", "Query: %s answered completely",
  2687     				(char*)bpq_block.query_val());
  2687     				(char*)bpq_block.query_val());
  2688             event->daemon_only_ = true;
  2688             event->daemon_only_ = true;
  2689         }
  2689         }
  2690     }
  2690     } else if (bpq_block.kind() == BPQBlock::KIND_RESPONSE) {
  2691     // don't accept local responses
  2691     	// don't accept local responses
  2692     else if (bpq_block.kind() == BPQBlock::KIND_RESPONSE && !local_bundle) {
  2692     	if (!local_bundle) {
  2693 		if (bpq_cache()->add_response_bundle(bundle, &bpq_block) &&
  2693 
  2694 			event->source_ != EVENTSRC_STORE) {
  2694     		if (bpq_cache()->add_response_bundle(bundle, &bpq_block) &&
  2695 
  2695     			event->source_ != EVENTSRC_STORE) {
  2696 			bundle->set_in_datastore(true);
  2696 
  2697 			actions_->store_add(bundle);
  2697     			bundle->set_in_datastore(true);
  2698 		}
  2698 				actions_->store_add(bundle);
  2699     }
  2699     		}
  2700     else {
  2700     	}
       
  2701     } else {
  2701         log_err_p("/dtn/daemon/bpq", "ERROR - BPQ Block: invalid kind %d", 
  2702         log_err_p("/dtn/daemon/bpq", "ERROR - BPQ Block: invalid kind %d", 
  2702             bpq_block.kind());
  2703             bpq_block.kind());
  2703         NOTREACHED;
  2704         NOTREACHED;
  2704         return false; 
  2705         return false; 
  2705     }
  2706     }