comm: Make SyncLogic responsible for update prefix

refs: #2289

Change-Id: I7687e36c88853bdf58de654b1ca280662a826b4b
diff --git a/src/lsdb.cpp b/src/lsdb.cpp
index 212ae42..ce7c706 100644
--- a/src/lsdb.cpp
+++ b/src/lsdb.cpp
@@ -579,11 +579,7 @@
     m_hasSyncPrefixBeenRegistered = true;
   }
 
-  ndn::Name lsaPrefix = m_nlsr.getConfParameter().getLsaPrefix();
-  lsaPrefix.append(m_nlsr.getConfParameter().getSiteName());
-  lsaPrefix.append(m_nlsr.getConfParameter().getRouterName());
-
-  m_nlsr.getSyncLogicHandler().publishRoutingUpdate(m_nlsr.getSequencingManager(), lsaPrefix);
+  m_sync.publishRoutingUpdate();
 
   return isInstalled;
 }
@@ -656,14 +652,7 @@
         chkNameLsa->setExpiringEventId(scheduleNameLsaExpiration(chkNameLsa->getKey(),
                                                                  chkNameLsa->getLsSeqNo(),
                                                                  m_lsaRefreshTime));
-        // publish routing update
-        //ndn::Name lsaPrefix = m_nlsr.getConfParameter().getLsaPrefix();
-        //lsaPrefix.append(m_nlsr.getConfParameter().getRouterPrefix());
-        ndn::Name lsaPrefix = m_nlsr.getConfParameter().getLsaPrefix();
-        lsaPrefix.append(m_nlsr.getConfParameter().getSiteName());
-        lsaPrefix.append(m_nlsr.getConfParameter().getRouterName());
-        m_nlsr.getSyncLogicHandler().publishRoutingUpdate(m_nlsr.getSequencingManager(),
-                                                          lsaPrefix);
+        m_sync.publishRoutingUpdate();
       }
       else {
         _LOG_DEBUG("Other's Name LSA, so removing form LSDB");
@@ -695,14 +684,7 @@
         chkAdjLsa->setExpiringEventId(scheduleAdjLsaExpiration(chkAdjLsa->getKey(),
                                                                chkAdjLsa->getLsSeqNo(),
                                                                m_lsaRefreshTime));
-        // publish routing update
-        //ndn::Name lsaPrefix = m_nlsr.getConfParameter().getLsaPrefix();
-        //lsaPrefix.append(m_nlsr.getConfParameter().getRouterPrefix());
-        ndn::Name lsaPrefix = m_nlsr.getConfParameter().getLsaPrefix();
-        lsaPrefix.append(m_nlsr.getConfParameter().getSiteName());
-        lsaPrefix.append(m_nlsr.getConfParameter().getRouterName());
-        m_nlsr.getSyncLogicHandler().publishRoutingUpdate(m_nlsr.getSequencingManager(),
-                                                          lsaPrefix);
+        m_sync.publishRoutingUpdate();
       }
       else {
         _LOG_DEBUG("Other's Adj LSA, so removing form LSDB");
@@ -738,14 +720,7 @@
                                         chkCorLsa->getKey(),
                                         chkCorLsa->getLsSeqNo(),
                                         m_lsaRefreshTime));
-        // publish routing update
-        //ndn::Name lsaPrefix = m_nlsr.getConfParameter().getLsaPrefix();
-        //lsaPrefix.append(m_nlsr.getConfParameter().getRouterPrefix());
-        ndn::Name lsaPrefix = m_nlsr.getConfParameter().getLsaPrefix();
-        lsaPrefix.append(m_nlsr.getConfParameter().getSiteName());
-        lsaPrefix.append(m_nlsr.getConfParameter().getRouterName());
-        m_nlsr.getSyncLogicHandler().publishRoutingUpdate(m_nlsr.getSequencingManager(),
-                                                          lsaPrefix);
+        m_sync.publishRoutingUpdate();
       }
       else {
         _LOG_DEBUG("Other's Cor LSA, so removing form LSDB");