table: don't use shared_ptr in FIB
refs #3164
Change-Id: I5b5eb47d60f6bf5b6389c32ac840f793767e4334
diff --git a/daemon/fw/asf-probing-module.cpp b/daemon/fw/asf-probing-module.cpp
index f561b52..097a372 100644
--- a/daemon/fw/asf-probing-module.cpp
+++ b/daemon/fw/asf-probing-module.cpp
@@ -64,7 +64,7 @@
});
}
-shared_ptr<Face>
+Face*
ProbingModule::getFaceToProbe(const Face& inFace,
const Interest& interest,
const fib::Entry& fibEntry,
@@ -84,23 +84,23 @@
// Put eligible faces into rankedFaces. If a face does not have an RTT measurement,
// immediately pick the face for probing
for (const fib::NextHop& hop : fibEntry.getNextHops()) {
- const shared_ptr<Face>& hopFace = hop.getFace();
+ Face& hopFace = hop.getFace();
// Don't send probe Interest back to the incoming face or use the same face
// as the forwarded Interest
- if (hopFace->getId() == inFace.getId() || hopFace->getId() == faceUsed.getId()) {
+ if (hopFace.getId() == inFace.getId() || hopFace.getId() == faceUsed.getId()) {
continue;
}
- FaceInfo* info = m_measurements.getFaceInfo(fibEntry, interest, *hopFace);
+ FaceInfo* info = m_measurements.getFaceInfo(fibEntry, interest, hopFace);
// If no RTT has been recorded, probe this face
if (info == nullptr || !info->hasSrttMeasurement()) {
- return hopFace;
+ return &hopFace;
}
// Add FaceInfo to container sorted by RTT
- rankedFaces.insert(std::make_pair(info, hopFace));
+ rankedFaces.insert(std::make_pair(info, &hopFace));
}
if (rankedFaces.empty()) {
@@ -140,7 +140,7 @@
scheduleProbe(fibEntry, m_probingInterval);
}
-shared_ptr<Face>
+Face*
ProbingModule::getFaceBasedOnProbability(const FaceInfoFacePairSet& rankedFaces)
{
double randomNumber = getRandomNumber(0, 1);