foo
authoraidan
Thu, 13 Oct 2011 15:41:53 +0100
changeset 62 935bf9f13cfc
parent 61 166a3782491c
child 63 9a8be24c5037
foo
servlib/bundling/BundleDaemon.cc
--- a/servlib/bundling/BundleDaemon.cc	Thu Oct 13 14:59:44 2011 +0100
+++ b/servlib/bundling/BundleDaemon.cc	Thu Oct 13 15:41:53 2011 +0100
@@ -2687,17 +2687,18 @@
     				(char*)bpq_block.query_val());
             event->daemon_only_ = true;
         }
-    }
-    // don't accept local responses
-    else if (bpq_block.kind() == BPQBlock::KIND_RESPONSE && !local_bundle) {
-		if (bpq_cache()->add_response_bundle(bundle, &bpq_block) &&
-			event->source_ != EVENTSRC_STORE) {
+    } else if (bpq_block.kind() == BPQBlock::KIND_RESPONSE) {
+    	// don't accept local responses
+    	if (!local_bundle) {
 
-			bundle->set_in_datastore(true);
-			actions_->store_add(bundle);
-		}
-    }
-    else {
+    		if (bpq_cache()->add_response_bundle(bundle, &bpq_block) &&
+    			event->source_ != EVENTSRC_STORE) {
+
+    			bundle->set_in_datastore(true);
+				actions_->store_add(bundle);
+    		}
+    	}
+    } else {
         log_err_p("/dtn/daemon/bpq", "ERROR - BPQ Block: invalid kind %d", 
             bpq_block.kind());
         NOTREACHED;