nlsr: refactor Adjacent to use FaceUri objects
Change-Id: Ib46f70570669c381572182eeea5c047a38a05104
refs: #4063
diff --git a/src/lsa.cpp b/src/lsa.cpp
index 46dc1c4..78e5837 100644
--- a/src/lsa.cpp
+++ b/src/lsa.cpp
@@ -253,7 +253,7 @@
os << m_origRouter << "|" << AdjLsa::TYPE_STRING << "|" << m_lsSeqNo << "|"
<< ndn::time::toIsoString(m_expirationTimePoint) << "|" << m_adl.getSize();
for (const auto& adjacent : m_adl.getAdjList()) {
- os << "|" << adjacent.getName() << "|" << adjacent.getConnectingFaceUri()
+ os << "|" << adjacent.getName() << "|" << adjacent.getFaceUri()
<< "|" << adjacent.getLinkCost();
}
os << "|";
@@ -290,7 +290,8 @@
ndn::Name adjName(*tok_iter++);
std::string connectingFaceUri(*tok_iter++);
double linkCost = boost::lexical_cast<double>(*tok_iter++);
- Adjacent adjacent(adjName, connectingFaceUri, linkCost, Adjacent::STATUS_INACTIVE, 0, 0);
+ Adjacent adjacent(adjName, ndn::util::FaceUri(connectingFaceUri), linkCost,
+ Adjacent::STATUS_INACTIVE, 0, 0);
addAdjacent(adjacent);
}
catch (const std::exception& e) {
@@ -342,7 +343,7 @@
for (const Adjacent& adjacency : adjLsa) {
os << " Adjacent " << adjacencyIndex++ << ":\n"
<< " Adjacent Name: " << adjacency.getName() << "\n"
- << " Connecting FaceUri: " << adjacency.getConnectingFaceUri() << "\n"
+ << " Connecting FaceUri: " << adjacency.getFaceUri() << "\n"
<< " Link Cost: " << adjacency.getLinkCost() << "\n";
}
os << "adj_lsa_end";