servlib/bundling/BundleDaemon.cc
changeset 60 64954ed8a0a1
parent 56 76420d9f6e62
child 61 166a3782491c
--- a/servlib/bundling/BundleDaemon.cc	Thu Oct 06 18:06:34 2011 +0100
+++ b/servlib/bundling/BundleDaemon.cc	Thu Oct 13 10:58:18 2011 +0100
@@ -929,10 +929,8 @@
          event->source_ == EVENTSRC_STORE ||
          event->source_ == EVENTSRC_FRAGMENTATION) {
 
-        // TODO: change this to allow fragment responses be sent
-//        if ( ! bundle->is_fragment() ) {
 		handle_bpq_block(bundle, event);
-//        }
+
     }
 
     // If the bundle contains a BPQ query that was successfully answered
@@ -2633,6 +2631,8 @@
     		if (bundle->recv_blocks().has_block(BundleProtocol::QUERY_EXTENSION_BLOCK)) {
     			block = bundle->recv_blocks().
     			                find_block(BundleProtocol::QUERY_EXTENSION_BLOCK);
+    		} else {
+    			return false;
     		}
     		break;
 
@@ -2640,19 +2640,12 @@
     		if (bundle->api_blocks()->has_block(BundleProtocol::QUERY_EXTENSION_BLOCK)) {
 				block = bundle->api_blocks()->
     		                	find_block(BundleProtocol::QUERY_EXTENSION_BLOCK);
+    		} else {
+    			return false;
     		}
     		break;
 
     	case EVENTSRC_STORE:
-    		if (bundle->in_bpq_cache()) {
-    			log_info_p("/dtn/daemon/bpq", "handle_bpq_block: cache bundle from STORE");
-    			BPQBlock bpq_block(bundle);
-    			bpq_cache()->answer_query(bundle, &bpq_block);
-//    			accept_bpq_response(bundle, &bpq_block, false);
-    			return true;
-    		}
-    		break;
-
     	case EVENTSRC_FRAGMENTATION:
     		if (bundle->recv_blocks().has_block(BundleProtocol::QUERY_EXTENSION_BLOCK)) {
 				block = bundle->recv_blocks().
@@ -2661,6 +2654,8 @@
     		else if (bundle->api_blocks()->has_block(BundleProtocol::QUERY_EXTENSION_BLOCK)) {
 				block = bundle->api_blocks()->
     		                	find_block(BundleProtocol::QUERY_EXTENSION_BLOCK);
+    		} else {
+    			return false;
     		}
     		break;