publisher: set router-name command prefix correctly
refs: #3651
Change-Id: Ic3771de5161fc482f76df78035dcb9f5325e1a9d
diff --git a/src/publisher/lsdb-dataset-interest-handler.hpp b/src/publisher/lsdb-dataset-interest-handler.hpp
index c56c638..4285803 100644
--- a/src/publisher/lsdb-dataset-interest-handler.hpp
+++ b/src/publisher/lsdb-dataset-interest-handler.hpp
@@ -48,7 +48,6 @@
LsdbDatasetInterestHandler(Lsdb& lsdb,
ndn::Face& face,
- const ndn::Name& routerName,
ndn::KeyChain& keyChain);
void
@@ -63,10 +62,16 @@
return LOCALHOST_COMMAND_PREFIX;
}
- const ndn::Name&
+ ndn::Name&
getRouterNameCommandPrefix()
{
- return ROUTER_NAME_COMMAND_PREFIX;
+ return m_routerNameCommandPrefix;
+ }
+
+ void
+ setRouterNameCommandPrefix(const ndn::Name& routerName) {
+ m_routerNameCommandPrefix = routerName;
+ m_routerNameCommandPrefix.append(Lsdb::NAME_COMPONENT);
}
private:
@@ -84,7 +89,7 @@
private:
const ndn::Name LOCALHOST_COMMAND_PREFIX;
- const ndn::Name ROUTER_NAME_COMMAND_PREFIX;
+ ndn::Name m_routerNameCommandPrefix;
ndn::Face& m_face;
ndn::KeyChain& m_keyChain;