Remove some unused functions
Change-Id: Ic99891d2037e928ac927651607559e7660bd677f
diff --git a/src/adjacency-list.cpp b/src/adjacency-list.cpp
index bd6783c..7fa3e6e 100644
--- a/src/adjacency-list.cpp
+++ b/src/adjacency-list.cpp
@@ -59,20 +59,6 @@
}
}
-bool
-AdjacencyList::updateAdjacentStatus(const ndn::Name& adjName, Adjacent::Status s)
-{
- std::list<Adjacent>::iterator it = find(adjName);
-
- if (it == m_adjList.end()) {
- return false;
- }
- else {
- it->setStatus(s);
- return true;
- }
-}
-
Adjacent
AdjacencyList::getAdjacent(const ndn::Name& adjName)
{
@@ -97,17 +83,6 @@
return ourList == theirList;
}
-int32_t
-AdjacencyList::updateAdjacentLinkCost(const ndn::Name& adjName, double lc)
-{
- std::list<Adjacent>::iterator it = find(adjName);
- if (it == m_adjList.end()) {
- return -1;
- }
- (*it).setLinkCost(lc);
- return 0;
-}
-
bool
AdjacencyList::isNeighbor(const ndn::Name& adjName) const
{
diff --git a/src/adjacency-list.hpp b/src/adjacency-list.hpp
index 61205c8..3b82a7c 100644
--- a/src/adjacency-list.hpp
+++ b/src/adjacency-list.hpp
@@ -52,21 +52,6 @@
int32_t
insert(Adjacent& adjacent);
- /*! \brief Sets the status of an adjacency.
-
- \param adjName The adjacency in this list you want to change the status of.
-
- \param s The status to change to.
-
- \return A boolean indicating whether an adjacency was
- updated. This is false if s is not in the list.
- */
- bool
- updateAdjacentStatus(const ndn::Name& adjName, Adjacent::Status s);
-
- int32_t
- updateAdjacentLinkCost(const ndn::Name& adjName, double lc);
-
std::list<Adjacent>&
getAdjList();
diff --git a/src/conf-parameter.hpp b/src/conf-parameter.hpp
index cac002a..549d353 100644
--- a/src/conf-parameter.hpp
+++ b/src/conf-parameter.hpp
@@ -303,18 +303,6 @@
}
void
- setLogLevel(const std::string& logLevel)
- {
- m_logLevel = logLevel;
- }
-
- const std::string&
- getLogLevel() const
- {
- return m_logLevel;
- }
-
- void
setInterestRetryNumber(uint32_t irn)
{
m_interestRetryNumber = irn;
diff --git a/src/lsa-segment-storage.cpp b/src/lsa-segment-storage.cpp
index a567aab..fa656d3 100644
--- a/src/lsa-segment-storage.cpp
+++ b/src/lsa-segment-storage.cpp
@@ -47,7 +47,7 @@
{
ndn::Name lsaSegmentsKey = interest.getName();
- // If this the first interest then it does not contain the segment number,
+ // If this is the first interest then it does not contain the segment number,
// so need to append zero segment component at the end to match with the data
if (lsaSegmentsKey.size() > 0) {
if (!lsaSegmentsKey.get(-1).isSegment()) {
@@ -142,17 +142,4 @@
});
}
-void
-LsaSegmentStorage::insertSegment(const ndn::Name& segmentKey,
- const ndn::Data& segmentValue)
-{
- m_lsaSegments[segmentKey] = segmentValue;
-}
-
-void
-LsaSegmentStorage::deleteSegment(const ndn::Name& segmentKey)
-{
- m_lsaSegments.erase(segmentKey);
-}
-
-} // namespace nlsr
\ No newline at end of file
+} // namespace nlsr
diff --git a/src/lsa-segment-storage.hpp b/src/lsa-segment-storage.hpp
index bc98f25..468b2fe 100644
--- a/src/lsa-segment-storage.hpp
+++ b/src/lsa-segment-storage.hpp
@@ -51,20 +51,6 @@
const ndn::Data*
getLsaSegment(const ndn::Interest& interest);
- /*! \brief Inserts an LSA segment into LsaSegmentStorage
- * \param segmentKey Name of data without the version number.
- * The format of the key is /router-prefix/LS type/sequence no./segment no.
- * \param segmentValue The actual data packet.
- */
- void
- insertSegment(const ndn::Name& segmentKey, const ndn::Data& segmentValue);
-
- /*! \brief Given the key remove the corresponding data packet from LsaSegmentStorage.
- * \param segmentKey Key of the Data packet that will be deleted.
- */
- void
- deleteSegment(const ndn::Name& segmentKey);
-
PUBLIC_WITH_TESTS_ELSE_PRIVATE:
/*! \brief Callback when SegmentFetcher retrieves a segment.
*/
@@ -99,4 +85,4 @@
} // namespace nlsr
-#endif // NLSR_LSA_SEGMENT_STORAGE_HPP
\ No newline at end of file
+#endif // NLSR_LSA_SEGMENT_STORAGE_HPP
diff --git a/src/lsdb.hpp b/src/lsdb.hpp
index 14c8842..f3eb899 100644
--- a/src/lsdb.hpp
+++ b/src/lsdb.hpp
@@ -197,7 +197,8 @@
}
LsaSegmentStorage&
- getLsaStorage() {
+ getLsaStorage()
+ {
return m_lsaStorage;
}
diff --git a/src/nlsr.cpp b/src/nlsr.cpp
index ebc469d..384d4e9 100644
--- a/src/nlsr.cpp
+++ b/src/nlsr.cpp
@@ -142,7 +142,6 @@
void
Nlsr::setStrategies()
{
- NLSR_LOG_TRACE("in setStrategies");
const std::string strategy("ndn:/localhost/nfd/strategy/multicast");
m_fib.setStrategy(m_confParam.getLsaPrefix(), strategy, 0);
diff --git a/src/route/name-prefix-table.cpp b/src/route/name-prefix-table.cpp
index d2e8527..dee3630 100644
--- a/src/route/name-prefix-table.cpp
+++ b/src/route/name-prefix-table.cpp
@@ -48,12 +48,6 @@
m_afterRoutingChangeConnection.disconnect();
}
-bool
-npteCompare(std::shared_ptr<NamePrefixTableEntry>& npte, const ndn::Name& name)
-{
- return npte->getNamePrefix() == name;
-}
-
void
NamePrefixTable::addEntry(const ndn::Name& name, const ndn::Name& destRouter)
{
diff --git a/src/route/name-prefix-table.hpp b/src/route/name-prefix-table.hpp
index 1e11e15..aa55c9e 100644
--- a/src/route/name-prefix-table.hpp
+++ b/src/route/name-prefix-table.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014-2017, The University of Memphis,
+ * Copyright (c) 2014-2018, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@@ -140,9 +140,6 @@
return m_table.end();
}
-bool
-npteCompare(NamePrefixTableEntry& npte, const ndn::Name& name);
-
std::ostream&
operator<<(std::ostream& os, const NamePrefixTable& table);
diff --git a/tests/update/test-prefix-update-processor.cpp b/tests/update/test-prefix-update-processor.cpp
index 70d18c9..4fdf19b 100644
--- a/tests/update/test-prefix-update-processor.cpp
+++ b/tests/update/test-prefix-update-processor.cpp
@@ -170,20 +170,6 @@
return (it != face.sentData.end());
}
- void
- checkResponseCode(const Name& commandPrefix, uint64_t expectedCode)
- {
- std::vector<Data>::iterator it = std::find_if(face.sentData.begin(),
- face.sentData.end(),
- [commandPrefix] (const Data& data) {
- return commandPrefix.isPrefixOf(data.getName());
- });
- BOOST_REQUIRE(it != face.sentData.end());
-
- ndn::nfd::ControlResponse response(it->getContent().blockFromValue());
- BOOST_CHECK_EQUAL(response.getCode(), expectedCode);
- }
-
public:
ndn::util::DummyClientFace face;