Schedule Adj LSA build and installation
diff --git a/nlsr_im.cpp b/nlsr_im.cpp
index a29fac9..cdcba5f 100644
--- a/nlsr_im.cpp
+++ b/nlsr_im.cpp
@@ -7,6 +7,7 @@
#include "nlsr_im.hpp"
#include "nlsr_dm.hpp"
#include "nlsr_tokenizer.hpp"
+#include "nlsr_lsdb.hpp"
using namespace std;
using namespace ndn;
@@ -98,7 +99,15 @@
(infoIntTimedOutCount == pnlsr.getConfParameter().getInterestRetryNumber()))
{
pnlsr.getAdl().setStatusOfNeighbor(neighbor,0);
- // schedule event for building adjacency LSA
+ pnlsr.incrementAdjBuildCount();
+ if ( pnlsr.getIsBuildAdjLsaSheduled() == 0 )
+ {
+ pnlsr.setIsBuildAdjLsaSheduled(1);
+ // event here
+ pnlsr.getScheduler().scheduleEvent(ndn::time::seconds(5),
+ ndn::bind(&Lsdb::scheduledAdjLsaBuild,pnlsr.getLsdb(),
+ boost::ref(pnlsr)));
+ }
}
}