catchunks: get rid of the last few remaining uses of Selectors
Refs: #4556
Change-Id: Ibe0e909c21b57aaa47c325bdef5852cb5e38482b
diff --git a/tools/chunks/catchunks/pipeline-interests-adaptive.cpp b/tools/chunks/catchunks/pipeline-interests-adaptive.cpp
index 03a842f..93cd30d 100644
--- a/tools/chunks/catchunks/pipeline-interests-adaptive.cpp
+++ b/tools/chunks/catchunks/pipeline-interests-adaptive.cpp
@@ -155,10 +155,11 @@
}
}
- Interest interest(Name(m_prefix).appendSegment(segNo));
- interest.setInterestLifetime(m_options.interestLifetime);
- interest.setMustBeFresh(m_options.mustBeFresh);
- interest.setMaxSuffixComponents(1);
+ auto interest = Interest()
+ .setName(Name(m_prefix).appendSegment(segNo))
+ .setCanBePrefix(false)
+ .setMustBeFresh(m_options.mustBeFresh)
+ .setInterestLifetime(m_options.interestLifetime);
SegmentInfo& segInfo = m_segmentInfo[segNo];
segInfo.interestHdl = m_face.expressInterest(interest,
@@ -211,7 +212,7 @@
if (isStopping())
return;
- // Data name will not have extra components because MaxSuffixComponents is set to 1
+ // Interest was expressed with CanBePrefix=false
BOOST_ASSERT(data.getName().equals(interest.getName()));
if (!m_hasFinalBlockId && data.getFinalBlock()) {
diff --git a/tools/chunks/catchunks/pipeline-interests-fixed.cpp b/tools/chunks/catchunks/pipeline-interests-fixed.cpp
index 6df6d27..55fe7fc 100644
--- a/tools/chunks/catchunks/pipeline-interests-fixed.cpp
+++ b/tools/chunks/catchunks/pipeline-interests-fixed.cpp
@@ -78,10 +78,11 @@
if (m_options.isVerbose)
std::cerr << "Requesting segment #" << nextSegmentNo << std::endl;
- Interest interest(Name(m_prefix).appendSegment(nextSegmentNo));
- interest.setInterestLifetime(m_options.interestLifetime);
- interest.setMustBeFresh(m_options.mustBeFresh);
- interest.setMaxSuffixComponents(1);
+ auto interest = Interest()
+ .setName(Name(m_prefix).appendSegment(nextSegmentNo))
+ .setCanBePrefix(false)
+ .setMustBeFresh(m_options.mustBeFresh)
+ .setInterestLifetime(m_options.interestLifetime);
auto fetcher = DataFetcher::fetch(m_face, interest,
m_options.maxRetriesOnTimeoutOrNack,
@@ -114,6 +115,7 @@
if (isStopping())
return;
+ // Interest was expressed with CanBePrefix=false
BOOST_ASSERT(data.getName().equals(interest.getName()));
if (m_options.isVerbose)