# HG changeset patch # User aidan # Date 1308045410 -3600 # Node ID 84c85b6450de4c513d8aaab806c177da23cc9493 # Parent b72ba16e5586ceaa0f4be63f0c240aa85081688c changes to the response bundle creation (inc new timestamp value) diff -r b72ba16e5586 -r 84c85b6450de servlib/bundling/BPQResponse.cc --- 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 //#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(), diff -r b72ba16e5586 -r 84c85b6450de servlib/bundling/BundleDaemon.cc --- a/servlib/bundling/BundleDaemon.cc Thu Jun 09 10:57:40 2011 +0100 +++ b/servlib/bundling/BundleDaemon.cc Tue Jun 14 10:56:50 2011 +0100 @@ -2637,8 +2637,6 @@ */ if (bpq_block.kind() == BPQBlock::KIND_QUERY) { if (answer_bpq_query(bundle, &bpq_block)) { -//HACK... - BundleProtocol::delete_blocks(bundle, event->link_); event->daemon_only_ = true; }