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/forwarder.cpp b/daemon/fw/forwarder.cpp
index adcb134..3bb580d 100644
--- a/daemon/fw/forwarder.cpp
+++ b/daemon/fw/forwarder.cpp
@@ -187,12 +187,8 @@
this->setUnsatisfyTimer(pitEntry);
// dispatch to strategy: after incoming Interest
- const fib::Entry& fibEntry = this->lookupFib(*pitEntry);
- shared_ptr<fib::Entry> fibEntryP = const_cast<fib::Entry&>(fibEntry).shared_from_this();
this->dispatchToStrategy(pitEntry,
- [&] (fw::Strategy* strategy) {
- strategy->afterReceiveInterest(inFace, interest, fibEntryP, pitEntry);
- });
+ [&] (fw::Strategy* strategy) { strategy->afterReceiveInterest(inFace, interest, pitEntry); });
}
void
@@ -469,12 +465,8 @@
outRecord->setIncomingNack(nack);
// trigger strategy: after receive NACK
- const fib::Entry& fibEntry = this->lookupFib(*pitEntry);
- shared_ptr<fib::Entry> fibEntryP = const_cast<fib::Entry&>(fibEntry).shared_from_this();
this->dispatchToStrategy(pitEntry,
- [&] (fw::Strategy* strategy) {
- strategy->afterReceiveNack(inFace, nack, fibEntryP, pitEntry);
- });
+ [&] (fw::Strategy* strategy) { strategy->afterReceiveNack(inFace, nack, pitEntry); });
}
void