diff --git a/daemon/fw/forwarder.cpp b/daemon/fw/forwarder.cpp index 6ce928ed..5d886e83 100644 --- a/daemon/fw/forwarder.cpp +++ b/daemon/fw/forwarder.cpp @@ -151,7 +151,7 @@ Forwarder::onIncomingInterest(const Interest& interest, const FaceEndpoint& ingr } if (hasDuplicateNonceInPit) { // goto Interest loop pipeline - this->onInterestLoop(ingress, interest); + this->onInterestLoop(interest, ingress); m_strategyChoice.findEffectiveStrategy(*pitEntry).afterReceiveLoopedInterest(ingress, interest, *pitEntry); return; } @@ -344,11 +344,8 @@ Forwarder::onIncomingData(const Data& data, const FaceEndpoint& ingress) beforeSatisfyInterest(*pitEntry, ingress.face, data); std::set> unsatisfiedDownstreams; - this->dispatchToStrategy(*pitEntry, - [&] (fw::Strategy& strategy) { - strategy.satisfyInterest(pitEntry, ingress, data, - satisfiedDownstreams, unsatisfiedDownstreams); - }); + m_strategyChoice.findEffectiveStrategy(*pitEntry).satisfyInterest(pitEntry, ingress, data, + satisfiedDownstreams, unsatisfiedDownstreams); for (const auto& endpoint : unsatisfiedDownstreams) { unsatisfiedPitEntries.emplace(endpoint, pitEntry); } @@ -399,7 +396,7 @@ Forwarder::onIncomingData(const Data& data, const FaceEndpoint& ingress) continue; } - this->onOutgoingData(data, FaceEndpoint(*downstream.first, downstream.second)); + this->onOutgoingData(data, *downstream.first); } } diff --git a/daemon/fw/forwarder.hpp b/daemon/fw/forwarder.hpp index 826c79ab..7d19bef3 100644 --- a/daemon/fw/forwarder.hpp +++ b/daemon/fw/forwarder.hpp @@ -150,7 +150,7 @@ class Forwarder */ signal::Signal afterCsMiss; -PUBLIC_WITH_TESTS_ELSE_PRIVATE: // pipelines +NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE: // pipelines /** \brief incoming Interest pipeline * \param interest the incoming Interest, must be well-formed and created with make_shared * \param ingress face on which \p interest was received and endpoint of the sender diff --git a/daemon/fw/strategy.cpp b/daemon/fw/strategy.cpp index 27ca68cf..a0df5eb3 100644 --- a/daemon/fw/strategy.cpp +++ b/daemon/fw/strategy.cpp @@ -188,7 +188,7 @@ Strategy::satisfyInterest(const shared_ptr& pitEntry, } // invoke PIT satisfy callback - beforeSatisfyInterest(pitEntry, ingress, data); + beforeSatisfyInterest(data, ingress, pitEntry); } @@ -202,14 +202,6 @@ Strategy::afterContentStoreHit(const Data& data, const FaceEndpoint& ingress, this->sendData(data, ingress.face, pitEntry); } -void -Strategy::beforeSatisfyInterest(const Data& data, const FaceEndpoint& ingress, - const shared_ptr& pitEntry) -{ - NFD_LOG_DEBUG("beforeSatisfyInterest pitEntry=" << pitEntry->getName() - << " in=" << ingress << " data=" << data.getName()); -} - void Strategy::afterReceiveData(const Data& data, const FaceEndpoint& ingress, const shared_ptr& pitEntry) diff --git a/daemon/fw/strategy.hpp b/daemon/fw/strategy.hpp index 514e35ee..7c018b65 100644 --- a/daemon/fw/strategy.hpp +++ b/daemon/fw/strategy.hpp @@ -180,8 +180,8 @@ class Strategy : noncopyable * may occur. However, the strategy is allowed to store weak_ptr. */ virtual void - beforeSatisfyInterest(const shared_ptr& pitEntry, - const FaceEndpoint& ingress, const Data& data); + beforeSatisfyInterest(const Data& data, const FaceEndpoint& ingress, + const shared_ptr& pitEntry); virtual void @@ -195,8 +195,8 @@ class Strategy : noncopyable * In the base class this method sends \p data to \p ingress */ virtual void - afterContentStoreHit(const shared_ptr& pitEntry, - const FaceEndpoint& ingress, const Data& data); + afterContentStoreHit(const Data& data, const FaceEndpoint& ingress, + const shared_ptr& pitEntry); /** \brief trigger after Data is received *