model: Remove assert in fib::Entry::UpdateFaceRtt and fib::Entry::UpdateStatus
Instead of asserting, these methods now simply do nothing if the
supplied face is not part of the FIB entry.
diff --git a/docs/source/helpers.rst b/docs/source/helpers.rst
index 9ffa3b7..a1f88f8 100644
--- a/docs/source/helpers.rst
+++ b/docs/source/helpers.rst
@@ -154,7 +154,7 @@
A desired :ndnsim:`forwarding strategy <ForwardingStrategy>` parameter need to be set before installing stack on a node.
-To select a particular forwarding strategy implementation and configure its parameters, use :ndnsim:`SetForwardingStrategy <ndn::StackHelper::SetContentStore>` helper method:
+To select a particular forwarding strategy implementation and configure its parameters, use :ndnsim:`SetForwardingStrategy <ndn::StackHelper::SetForwardingStrategy>` helper method:
.. code-block:: c++
diff --git a/model/fib/ndn-fib-entry.cc b/model/fib/ndn-fib-entry.cc
index eee3381..229557c 100644
--- a/model/fib/ndn-fib-entry.cc
+++ b/model/fib/ndn-fib-entry.cc
@@ -78,8 +78,10 @@
Entry::UpdateFaceRtt (Ptr<Face> face, const Time &sample)
{
FaceMetricByFace::type::iterator record = m_faces.get<i_face> ().find (face);
- NS_ASSERT_MSG (record != m_faces.get<i_face> ().end (),
- "Update status can be performed only on existing faces of CcxnFibEntry");
+ if (record == m_faces.get<i_face> ().end ())
+ {
+ return;
+ }
m_faces.modify (record,
ll::bind (&FaceMetric::UpdateRtt, ll::_1, sample));
@@ -94,8 +96,10 @@
NS_LOG_FUNCTION (this << boost::cref(*face) << status);
FaceMetricByFace::type::iterator record = m_faces.get<i_face> ().find (face);
- NS_ASSERT_MSG (record != m_faces.get<i_face> ().end (),
- "Update status can be performed only on existing faces of CcxnFibEntry");
+ if (record == m_faces.get<i_face> ().end ())
+ {
+ return;
+ }
m_faces.modify (record,
ll::bind (&FaceMetric::SetStatus, ll::_1, status));