resume unordered_map data structure
diff --git a/model/sync-app-data-publish.cc b/model/sync-app-data-publish.cc
index adef5e3..43f6b54 100644
--- a/model/sync-app-data-publish.cc
+++ b/model/sync-app-data-publish.cc
@@ -71,10 +71,10 @@
s.seq = seq + 1;
m_sequenceLog[name] = s;
- // unordered_map<pair<string, uint32_t>, string>::iterator it = m_recentData.find(make_pair(name, session));
- // if (it != m_recentData.end())
- // m_recentData.erase(it);
- // m_recentData.insert(make_pair(make_pair(name, session), dataBuffer));
+ unordered_map<pair<string, uint32_t>, string>::iterator it = m_recentData.find(make_pair(name, session));
+ if (it != m_recentData.end())
+ m_recentData.erase(it);
+ m_recentData.insert(make_pair(make_pair(name, session), dataBuffer));
return seq;
}
diff --git a/model/sync-app-data-publish.h b/model/sync-app-data-publish.h
index aa05d6c..9a2c6ff 100644
--- a/model/sync-app-data-publish.h
+++ b/model/sync-app-data-publish.h
@@ -23,7 +23,7 @@
#ifndef SYNC_APP_DATA_PUBLISH_H
#define SYNC_APP_DATA_PUBLISH_H
-// #include <boost/unordered_map.hpp>
+#include <boost/unordered_map.hpp>
#include "sync-seq-no.h"
#include "sync-ccnx-wrapper.h"
#include <utility>
@@ -84,8 +84,8 @@
uint32_t publishData (const std::string &name, uint32_t session, const std::string &dataBuffer, int freshness);
private:
- typedef std::map<std::string, Seq> SequenceLog;
- typedef std::map<std::pair<std::string, uint32_t>, std::string> RecentData;
+ typedef boost::unordered_map<std::string, Seq> SequenceLog;
+ typedef boost::unordered_map<std::pair<std::string, uint32_t>, std::string> RecentData;
CcnxWrapperPtr m_ccnxHandle;
SequenceLog m_sequenceLog;
diff --git a/model/sync-ccnx-wrapper.cc b/model/sync-ccnx-wrapper.cc
index 50da304..baf787c 100644
--- a/model/sync-ccnx-wrapper.cc
+++ b/model/sync-ccnx-wrapper.cc
@@ -174,7 +174,6 @@
switch (kind)
{
case CCN_UPCALL_FINAL: // effective in unit tests
- cout << "FINAL??" << endl;
delete f;
delete selfp;
return CCN_UPCALL_RESULT_OK;