src: change initialization order
Send Hello Interest after route to neighbor is successfully registered
--> First Hello interval is eliminated
--> After Hello Nack, wait exponentially before processing it as a timeout
Register sync route for each neighbor after its Hello Data is validated
refs: #5009
Change-Id: Ice39a591f1e58e474b494d93c913fa45e10f24f2
diff --git a/src/communication/sync-logic-handler.hpp b/src/communication/sync-logic-handler.hpp
index b9461c2..4dc2d3d 100644
--- a/src/communication/sync-logic-handler.hpp
+++ b/src/communication/sync-logic-handler.hpp
@@ -77,19 +77,6 @@
publishRoutingUpdate(const Lsa::Type& type, const uint64_t& seqNo);
PUBLIC_WITH_TESTS_ELSE_PRIVATE:
- /*! \brief Create and configure a Logic object to enable Sync for this NLSR.
- *
- * In a typical situation this only needs to be called once, when NLSR starts.
- * \param syncPrefix The sync prefix you want this Sync to use
- * \param syncInterestLifetime ChronoSync/PSync sends a periodic sync interest every
- * \p syncInterestLifetime / 2 ms
- * \sa Nlsr::initialize
- */
- void
- createSyncLogic(const ndn::Name& syncPrefix,
- const ndn::time::milliseconds& syncInterestLifetime =
- ndn::time::milliseconds(SYNC_INTEREST_LIFETIME_DEFAULT));
-
/*! \brief Callback from Sync protocol
*
* In a typical situation this only needs to be called once, when NLSR starts.
@@ -99,11 +86,6 @@
void
processUpdate(const ndn::Name& updateName, uint64_t highSeq);
- /*! \brief Simple function to glue Name components together
- */
- void
- buildUpdatePrefix();
-
/*! \brief Determine which kind of LSA was updated and fetch it.
*
* Checks that the received update is not from us, which can happen,
@@ -121,9 +103,6 @@
private:
ndn::Face& m_syncFace;
-PUBLIC_WITH_TESTS_ELSE_PRIVATE:
- std::shared_ptr<SyncProtocolAdapter> m_syncLogic;
-private:
IsLsaNew m_isLsaNew;
const ConfParameter& m_confParam;
@@ -132,6 +111,8 @@
ndn::Name m_adjLsaUserPrefix;
ndn::Name m_coorLsaUserPrefix;
+ SyncProtocolAdapter m_syncLogic;
+
private:
static const std::string NLSR_COMPONENT;
static const std::string LSA_COMPONENT;