examples: Use the cs of NFD
Change-Id: I6864b52b6b9c44e590b3f6cfcd46754c8c1251c9
Signed-off-by: Xinyu Ma <bitmxy@gmail.com>
diff --git a/examples/ndn-simple-with-content-freshness/one-interest-requester.cpp b/examples/ndn-simple-with-content-freshness/one-interest-requester.cpp
index 35cd5fd..0662580 100644
--- a/examples/ndn-simple-with-content-freshness/one-interest-requester.cpp
+++ b/examples/ndn-simple-with-content-freshness/one-interest-requester.cpp
@@ -88,6 +88,7 @@
Ptr<UniformRandomVariable> rand = CreateObject<UniformRandomVariable>();
interest->setNonce(rand->GetValue(0, std::numeric_limits<uint32_t>::max()));
interest->setInterestLifetime(ndn::time::seconds(1));
+ interest->setMustBeFresh(true);
NS_LOG_DEBUG("Sending Interest packet for " << m_name);
@@ -103,6 +104,7 @@
void
OneInterestRequester::OnData(std::shared_ptr<const ndn::Data> data)
{
+ App::OnData(data);
NS_LOG_DEBUG("<< D: " << data->getName());
}