src: Fix first event-interval scheduling
refs: #2615, #2593
Change-Id: I17da4d9acb83299a5666159fb988c1a97220eda8
diff --git a/src/nlsr.cpp b/src/nlsr.cpp
index 07eb43e..eb06be0 100644
--- a/src/nlsr.cpp
+++ b/src/nlsr.cpp
@@ -140,16 +140,17 @@
_LOG_DEBUG("Default NLSR identity: " << m_defaultIdentity);
setInfoInterestFilter();
setLsaInterestFilter();
+
+ // Set event intervals
+ setFirstHelloInterval(m_confParam.getFirstHelloInterval());
+ m_nlsrLsdb.setAdjLsaBuildInterval(m_confParam.getAdjLsaBuildInterval());
+ m_routingTable.setRoutingCalcInterval(m_confParam.getRoutingCalcInterval());
+
m_nlsrLsdb.buildAndInstallOwnNameLsa();
m_nlsrLsdb.buildAndInstallOwnCoordinateLsa();
registerKeyPrefix();
- // Set event intervals
- setFirstHelloInterval(m_confParam.getFirstHelloInterval());
- m_helloProtocol.setAdjLsaBuildInterval(m_confParam.getAdjLsaBuildInterval());
- m_routingTable.setRoutingCalcInterval(m_confParam.getRoutingCalcInterval());
-
m_helloProtocol.scheduleInterest(m_firstHelloInterval);
// Need to set direct neighbors' costs to 0 for hyperbolic routing