fw: on CS miss, pass ingress with EndpointId=0 to strategy

refs: #4849

Change-Id: Idebbd60c185497bde5c4372e512a5f937b42f0a7
This commit is contained in:
Md Ashiqur Rahman
2019-07-06 02:34:31 +00:00
committed by Davide Pesavento
parent 17a7001ae9
commit 115ea63ecf
+8 -4
View File
@@ -167,10 +167,12 @@ Forwarder::onContentStoreMiss(const FaceEndpoint& ingress,
NFD_LOG_DEBUG("onContentStoreMiss interest=" << interest.getName());
++m_counters.nCsMisses;
// insert in-record
// FIXME Strategies are not prepared to handle non-zero EndpointIds, so always insert
// the in-record with EndpointId=0 for now. Eventually, this pipeline will need
// to be refactored so that strategies can control the in-record insertion.
// the in-record and dispatch to strategy with EndpointId=0 for now. Eventually,
// this pipeline will need to be refactored so that strategies can control the
// in-record insertion.
// insert in-record
pitEntry->insertOrUpdateInRecord(ingress.face, 0, interest);
// set PIT expiry timer to the time that the last PIT in-record expires
@@ -198,7 +200,9 @@ Forwarder::onContentStoreMiss(const FaceEndpoint& ingress,
// dispatch to strategy: after incoming Interest
this->dispatchToStrategy(*pitEntry,
[&] (fw::Strategy& strategy) { strategy.afterReceiveInterest(ingress, interest, pitEntry); });
[&] (fw::Strategy& strategy) {
strategy.afterReceiveInterest(FaceEndpoint(ingress.face, 0), interest, pitEntry);
});
}
void