servlib/bundling/BPQResponse.cc
changeset 10 84c85b6450de
parent 7 0a3c1a78bf75
child 15 65e62bd13efd
--- a/servlib/bundling/BPQResponse.cc	Thu Jun 09 10:57:40 2011 +0100
+++ b/servlib/bundling/BPQResponse.cc	Tue Jun 14 10:56:50 2011 +0100
@@ -19,6 +19,7 @@
 #endif
 
 #include "BPQResponse.h"
+#include "BundleTimestamp.h"
 //#include <oasys/util/ScratchBuffer.h>
 //#include "SDNV.h"
 
@@ -47,6 +48,11 @@
     // set expiry
     new_response->set_expiration(query->expiration());      // TODO: check this is ok
 
+    // reset creation timestamp (seconds = now, seqno = id)
+    BundleTimestamp* ts = new BundleTimestamp(BundleTimestamp::get_current_time(),
+                                              new_response->bundleid());
+    new_response->set_creation_ts(*ts);
+
     // set payload
     log_debug_p(LOG, "Copy response payload");
     new_response->mutable_payload()->
@@ -89,7 +95,7 @@
         BlockProcessor* new_bp = BundleProtocol::find_processor(
                                     current_bi.owner()->block_type());
 
-        BlockInfo* new_bi = new_response->api_blocks()->append_block(new_bp);
+        BlockInfo* new_bi = new_response->mutable_recv_blocks()->append_block(new_bp);
         new_bp->init_block( new_bi,
                             new_response->mutable_recv_blocks(),
                             current_bi.type(),