fw: reorder function params to make the strategy API more uniform
Also add a non-const overload of Face::getCounters to avoid const_cast
Refs: #5173
Change-Id: Iff0bfbdedb90e68a373090cf3f247d9a7501f58d
diff --git a/daemon/fw/multicast-strategy.cpp b/daemon/fw/multicast-strategy.cpp
index 866b8ae..090a560 100644
--- a/daemon/fw/multicast-strategy.cpp
+++ b/daemon/fw/multicast-strategy.cpp
@@ -62,7 +62,7 @@
}
void
-MulticastStrategy::afterReceiveInterest(const FaceEndpoint& ingress, const Interest& interest,
+MulticastStrategy::afterReceiveInterest(const Interest& interest, const FaceEndpoint& ingress,
const shared_ptr<pit::Entry>& pitEntry)
{
const fib::Entry& fibEntry = this->lookupFib(*pitEntry);
@@ -83,7 +83,7 @@
}
NFD_LOG_DEBUG(interest << " from=" << ingress << " pitEntry-to=" << outFace.getId());
- auto* sentOutRecord = this->sendInterest(pitEntry, outFace, interest);
+ auto* sentOutRecord = this->sendInterest(interest, outFace, pitEntry);
if (sentOutRecord && suppressResult == RetxSuppressionResult::FORWARD) {
m_retxSuppression.incrementIntervalForOutRecord(*sentOutRecord);
}
@@ -105,7 +105,7 @@
if (isNextHopEligible(inFace, interest, nextHop, pitEntry)) {
NFD_LOG_DEBUG(interest << " from=" << inFace.getId() << " pitEntry-to=" << nextHopFaceId);
- this->sendInterest(pitEntry, nextHop.getFace(), interest);
+ this->sendInterest(interest, nextHop.getFace(), pitEntry);
break; // just one eligible incoming face record is enough
}