[ndnSIM] Fixes for 22.02
diff --git a/daemon/fw/forwarder.cpp b/daemon/fw/forwarder.cpp
index 6ce928e..5d886e8 100644
--- a/daemon/fw/forwarder.cpp
+++ b/daemon/fw/forwarder.cpp
@@ -151,7 +151,7 @@
}
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 @@
beforeSatisfyInterest(*pitEntry, ingress.face, data);
std::set<std::pair<Face*, EndpointId>> 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 @@
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 826c79a..7d19bef 100644
--- a/daemon/fw/forwarder.hpp
+++ b/daemon/fw/forwarder.hpp
@@ -150,7 +150,7 @@
*/
signal::Signal<Forwarder, Interest> 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 27ca68c..a0df5eb 100644
--- a/daemon/fw/strategy.cpp
+++ b/daemon/fw/strategy.cpp
@@ -188,7 +188,7 @@
}
// invoke PIT satisfy callback
- beforeSatisfyInterest(pitEntry, ingress, data);
+ beforeSatisfyInterest(data, ingress, pitEntry);
}
@@ -203,14 +203,6 @@
}
void
-Strategy::beforeSatisfyInterest(const Data& data, const FaceEndpoint& ingress,
- const shared_ptr<pit::Entry>& 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<pit::Entry>& pitEntry)
{
diff --git a/daemon/fw/strategy.hpp b/daemon/fw/strategy.hpp
index 514e35e..7c018b6 100644
--- a/daemon/fw/strategy.hpp
+++ b/daemon/fw/strategy.hpp
@@ -180,8 +180,8 @@
* may occur. However, the strategy is allowed to store weak_ptr<pit::Entry>.
*/
virtual void
- beforeSatisfyInterest(const shared_ptr<pit::Entry>& pitEntry,
- const FaceEndpoint& ingress, const Data& data);
+ beforeSatisfyInterest(const Data& data, const FaceEndpoint& ingress,
+ const shared_ptr<pit::Entry>& pitEntry);
virtual void
@@ -195,8 +195,8 @@
* In the base class this method sends \p data to \p ingress
*/
virtual void
- afterContentStoreHit(const shared_ptr<pit::Entry>& pitEntry,
- const FaceEndpoint& ingress, const Data& data);
+ afterContentStoreHit(const Data& data, const FaceEndpoint& ingress,
+ const shared_ptr<pit::Entry>& pitEntry);
/** \brief trigger after Data is received
*