fw: eliminate fibEntry in Strategy API
Strategy::lookupFib can be used to obtain FIB entry.
FIB lookup is skipped when strategy does not need it.
refs #3205
Change-Id: Icba67229cbc261d9def44ffa91461ea4b09982b2
diff --git a/daemon/fw/multicast-strategy.cpp b/daemon/fw/multicast-strategy.cpp
index 3c92130..9b89049 100644
--- a/daemon/fw/multicast-strategy.cpp
+++ b/daemon/fw/multicast-strategy.cpp
@@ -40,10 +40,10 @@
void
MulticastStrategy::afterReceiveInterest(const Face& inFace,
const Interest& interest,
- shared_ptr<fib::Entry> fibEntry,
shared_ptr<pit::Entry> pitEntry)
{
- const fib::NextHopList& nexthops = fibEntry->getNextHops();
+ const fib::Entry& fibEntry = this->lookupFib(*pitEntry);
+ const fib::NextHopList& nexthops = fibEntry.getNextHops();
for (fib::NextHopList::const_iterator it = nexthops.begin(); it != nexthops.end(); ++it) {
shared_ptr<Face> outFace = it->getFace();