interest table expiration
diff --git a/model/sync-interest-table.cc b/model/sync-interest-table.cc
index 7a7a394..767017c 100644
--- a/model/sync-interest-table.cc
+++ b/model/sync-interest-table.cc
@@ -30,7 +30,7 @@
unordered_set<string> SyncInterestTable::fetchAll()
{
- expireInterest();
+ expireInterests();
recursive_mutex::scoped_lock lock(m_mutex);
unordered_set<string> entries;
@@ -50,7 +50,7 @@
m_table.insert(make_pair(interest, currentTime));
}
-void SyncInterestTable::SyncInterestTable() {
+SyncInterestTable::SyncInterestTable() {
m_thread = thread(&SyncInterestTable::periodicCheck, this);
}
@@ -70,7 +70,7 @@
void SyncInterestTable::periodicCheck() {
sleep(4);
- expireInterest();
+ expireInterests();
}
}
diff --git a/model/sync-interest-table.h b/model/sync-interest-table.h
index c489909..0b5ead5 100644
--- a/model/sync-interest-table.h
+++ b/model/sync-interest-table.h
@@ -67,7 +67,7 @@
void periodicCheck();
private:
- static int m_checkPeriod = 4;
+ static const int m_checkPeriod = 4;
boost::unordered_map<std::string, time_t> m_table; // pit entries
boost::thread m_thread; // thread to check every 4 sec
boost::recursive_mutex m_mutex;