helper: Fixing bug with ndn::GlobalRoutingHelper
With certain metric parameters, the value was incorrectly wrapped
around zero, leading to incorrect route calculation (BoostGrapLibrary
was detecting negative edge weights).
diff --git a/helper/ndn-global-routing-helper.cc b/helper/ndn-global-routing-helper.cc
index ca03ffa..00d2098 100644
--- a/helper/ndn-global-routing-helper.cc
+++ b/helper/ndn-global-routing-helper.cc
@@ -364,7 +364,7 @@
for (uint32_t faceId = 0; faceId < l3->GetNFaces (); faceId++)
{
originalMetric[faceId] = l3->GetFace (faceId)->GetMetric ();
- l3->GetFace (faceId)->SetMetric (std::numeric_limits<int16_t>::max ()-1); // value std::numeric_limits<int16_t>::max () MUST NOT be used (reserved)
+ l3->GetFace (faceId)->SetMetric (std::numeric_limits<uint16_t>::max ()-1); // value std::numeric_limits<uint16_t>::max () MUST NOT be used (reserved)
}
for (uint32_t enabledFaceId = 0; enabledFaceId < l3->GetNFaces (); enabledFaceId++)