test for data publish and data fetch; small changes
diff --git a/model/sync-interest-table.cc b/model/sync-interest-table.cc
index 767017c..5b1c3e0 100644
--- a/model/sync-interest-table.cc
+++ b/model/sync-interest-table.cc
@@ -45,7 +45,9 @@
bool SyncInterestTable::insert(string interest)
{
recursive_mutex::scoped_lock lock(m_mutex);
- m_table.erase(m_table.find(interest));
+ unordered_map<string, time_t>::iterator it = m_table.find(interest);
+ if (it != m_table.end())
+ m_table.erase(it);
time_t currentTime = time(0);
m_table.insert(make_pair(interest, currentTime));
}