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/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));