fw: remove onInterestUnsatisfied pipeline stage
Change-Id: Ic008bb26b87db176bac8d51230e53f923b19e5d2
refs: 4290
diff --git a/daemon/fw/forwarder.cpp b/daemon/fw/forwarder.cpp
index 6d57a2d..cea2974 100644
--- a/daemon/fw/forwarder.cpp
+++ b/daemon/fw/forwarder.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2017, Regents of the University of California,
+ * Copyright (c) 2014-2018, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -244,19 +244,6 @@
}
void
-Forwarder::onInterestUnsatisfied(const shared_ptr<pit::Entry>& pitEntry)
-{
- NFD_LOG_DEBUG("onInterestUnsatisfied interest=" << pitEntry->getName());
-
- // invoke PIT unsatisfied callback
- this->dispatchToStrategy(*pitEntry,
- [&] (fw::Strategy& strategy) { strategy.beforeExpirePendingInterest(pitEntry); });
-
- // goto Interest Finalize pipeline
- this->onInterestFinalize(pitEntry, false);
-}
-
-void
Forwarder::onInterestFinalize(const shared_ptr<pit::Entry>& pitEntry, bool isSatisfied,
ndn::optional<time::milliseconds> dataFreshnessPeriod)
{
@@ -511,7 +498,7 @@
scheduler::cancel(pitEntry->m_unsatisfyTimer);
pitEntry->m_unsatisfyTimer = scheduler::schedule(lastExpiryFromNow,
- bind(&Forwarder::onInterestUnsatisfied, this, pitEntry));
+ bind(&Forwarder::onInterestFinalize, this, pitEntry, false, ndn::nullopt));
}
void
diff --git a/daemon/fw/forwarder.hpp b/daemon/fw/forwarder.hpp
index 6d50909..a61aae8 100644
--- a/daemon/fw/forwarder.hpp
+++ b/daemon/fw/forwarder.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2017, Regents of the University of California,
+ * Copyright (c) 2014-2018, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -214,11 +214,6 @@
VIRTUAL_WITH_TESTS void
onInterestReject(const shared_ptr<pit::Entry>& pitEntry);
- /** \brief Interest unsatisfied pipeline
- */
- VIRTUAL_WITH_TESTS void
- onInterestUnsatisfied(const shared_ptr<pit::Entry>& pitEntry);
-
/** \brief Interest finalize pipeline
* \param isSatisfied whether the Interest has been satisfied
* \param dataFreshnessPeriod FreshnessPeriod of satisfying Data
diff --git a/daemon/fw/strategy.cpp b/daemon/fw/strategy.cpp
index 284b1f2..d4d6827 100644
--- a/daemon/fw/strategy.cpp
+++ b/daemon/fw/strategy.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2017, Regents of the University of California,
+ * Copyright (c) 2014-2018, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -157,12 +157,6 @@
}
void
-Strategy::beforeExpirePendingInterest(const shared_ptr<pit::Entry>& pitEntry)
-{
- NFD_LOG_DEBUG("beforeExpirePendingInterest pitEntry=" << pitEntry->getName());
-}
-
-void
Strategy::afterReceiveNack(const Face& inFace, const lp::Nack& nack,
const shared_ptr<pit::Entry>& pitEntry)
{
diff --git a/daemon/fw/strategy.hpp b/daemon/fw/strategy.hpp
index e09b590..71fa506 100644
--- a/daemon/fw/strategy.hpp
+++ b/daemon/fw/strategy.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2017, Regents of the University of California,
+ * Copyright (c) 2014-2018, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -148,22 +148,6 @@
beforeSatisfyInterest(const shared_ptr<pit::Entry>& pitEntry,
const Face& inFace, const Data& data);
- /** \brief trigger before PIT entry expires
- *
- * PIT entry expires when InterestLifetime has elapsed for all InRecords,
- * and it is not satisfied by an incoming Data.
- *
- * This trigger is not invoked for PIT entry already satisfied.
- *
- * In this base class this method does nothing.
- *
- * \warning The strategy must not retain shared_ptr<pit::Entry>, otherwise undefined behavior
- * may occur. However, the strategy is allowed to store weak_ptr<pit::Entry>,
- * although this isn't useful here because PIT entry would be deleted shortly after.
- */
- virtual void
- beforeExpirePendingInterest(const shared_ptr<pit::Entry>& pitEntry);
-
/** \brief trigger after Nack is received
*
* This trigger is invoked when an incoming Nack is received in response to