Forgot to actually enforce limit on content store. Solved.
diff --git a/model/ccnx-content-store.cc b/model/ccnx-content-store.cc
index 4633000..b526308 100644
--- a/model/ccnx-content-store.cc
+++ b/model/ccnx-content-store.cc
@@ -126,6 +126,8 @@
if (it == m_contentStore.end ())
{ // add entry to the top
m_contentStore.get<mru> ().push_front (CcnxContentStoreEntry (header, packet));
+ if (m_contentStore.size () > m_maxSize)
+ m_contentStore.get<mru> ().pop_back ();
}
else
{
diff --git a/model/ccnx-content-store.h b/model/ccnx-content-store.h
index ee29f81..29b838a 100644
--- a/model/ccnx-content-store.h
+++ b/model/ccnx-content-store.h
@@ -291,7 +291,7 @@
CcnxContentStore& operator= (const CcnxContentStore &o); ///< Disabled copy operator
private:
- int m_maxSize; ///< \brief maximum number of entries in cache \internal
+ size_t m_maxSize; ///< \brief maximum number of entries in cache \internal
// string_key_hash_t<CsEntry> m_contentStore; ///< \brief actual content store \internal
/**