update: Refactor to use ndn-cxx dispatcher for prefix update/readvertise
refs: #3728
Change-Id: I3186433ed460850753f033a1d03fe27fd1fe889c
diff --git a/src/nlsr.cpp b/src/nlsr.cpp
index 5709313..c4658e8 100644
--- a/src/nlsr.cpp
+++ b/src/nlsr.cpp
@@ -19,16 +19,16 @@
* NLSR, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
**/
+#include "nlsr.hpp"
+#include "adjacent.hpp"
+#include "logger.hpp"
+
#include <cstdlib>
#include <string>
#include <sstream>
#include <cstdio>
#include <unistd.h>
-#include "nlsr.hpp"
-#include "adjacent.hpp"
-#include "logger.hpp"
-
#include <ndn-cxx/util/face-uri.hpp>
namespace nlsr {
@@ -70,7 +70,8 @@
, m_validator(m_nlsrFace, DEFAULT_BROADCAST_PREFIX, m_certificateCache, m_certStore)
, m_controller(m_nlsrFace, m_keyChain, m_validator)
, m_faceDatasetController(m_nlsrFace, m_keyChain)
- , m_prefixUpdateProcessor(m_nlsrFace,
+ , m_prefixUpdateProcessor(m_localhostDispatcher,
+ m_nlsrFace,
m_namePrefixList,
m_nlsrLsdb,
DEFAULT_BROADCAST_PREFIX,
@@ -113,10 +114,6 @@
void
Nlsr::onLocalhostRegistrationSuccess(const ndn::Name& name)
{
- _LOG_DEBUG("Successfully registered local prefix: " << name);
-
- m_prefixUpdateProcessor.startListening();
- m_nfdRibCommandProcessor.startListening();
// All dispatcher-related sub-prefixes *must* be registered before
// the top-level prefixes are added.
try {