--- a/servlib/bundling/BPQCache.cc Wed Oct 05 13:57:27 2011 +0100
+++ b/servlib/bundling/BPQCache.cc Thu Oct 06 12:15:22 2011 +0100
@@ -123,8 +123,8 @@
current_fragment,
local_eid);
- BundleReceivedEvent e(new_response, EVENTSRC_CACHE);
- BundleDaemon::instance()->post(&e);
+ BundleReceivedEvent* e = new BundleReceivedEvent(new_response, EVENTSRC_CACHE);
+ BundleDaemon::instance()->post(e);
if( !is_complete ){
BPQFragment bpq_frag( current_fragment->frag_offset(),
--- a/servlib/bundling/BPQCacheEntry.cc Wed Oct 05 13:57:27 2011 +0100
+++ b/servlib/bundling/BPQCacheEntry.cc Thu Oct 06 12:15:22 2011 +0100
@@ -24,7 +24,7 @@
{
if ( ! bundle->is_fragment() ) {
log_debug("add complete response to cache entry");
- bundle_ = bundle;
+ fragments_.insert_sorted(bundle, BundleList::SORT_FRAG_OFFSET);
is_complete_ = true;
} else if ( bundle->is_fragment() && ! is_complete_ ) {
--- a/servlib/bundling/BPQCacheEntry.h Wed Oct 05 13:57:27 2011 +0100
+++ b/servlib/bundling/BPQCacheEntry.h Thu Oct 06 12:15:22 2011 +0100
@@ -35,6 +35,7 @@
public:
BPQCacheEntry() :
Logger("BPQCacheEntry", "/dtn/bundle/bpq"),
+ bundle_(new Bundle(), "cache_entry"),
fragments_("cache_entry") {}
int add_response(Bundle* bundle);