fw: make strategies understand scope
refs #1253
Change-Id: I57f7a6008e6f08c9817e58f480020eb9219a4aec
diff --git a/daemon/table/pit-face-record.cpp b/daemon/table/pit-face-record.cpp
index cbcd3b1..5663dce 100644
--- a/daemon/table/pit-face-record.cpp
+++ b/daemon/table/pit-face-record.cpp
@@ -30,7 +30,13 @@
{
m_lastNonce = interest.getNonce();
m_lastRenewed = time::now();
- m_expiry = m_lastRenewed + time::milliseconds(interest.getInterestLifetime());
+
+ const ndn::Milliseconds DEFAULT_INTEREST_LIFETIME = static_cast<ndn::Milliseconds>(4000);
+ ndn::Milliseconds lifetime = interest.getInterestLifetime();
+ if (lifetime < 0) {
+ lifetime = DEFAULT_INTEREST_LIFETIME;
+ }
+ m_expiry = m_lastRenewed + time::milliseconds(lifetime);
}