Skip to content

Commit

Permalink
aodv: fix error in parameter settings
Browse files Browse the repository at this point in the history
  • Loading branch information
TommyPec committed Oct 16, 2024
1 parent 3571653 commit 4131d38
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/aodv/model/aodv-routing-protocol.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2267,11 +2267,16 @@ void
RoutingProtocol::DoInitialize()
{
NS_LOG_FUNCTION(this);
uint32_t startTime;
NS_ABORT_MSG_IF(m_ttlStart > m_netDiameter,
"AODV: configuration error, TtlStart ("
<< m_ttlStart << ") must be less than or equal to NetDiameter ("
<< m_netDiameter << ").");
if (m_enableHello)
{
m_htimer.SetFunction(&RoutingProtocol::HelloTimerExpire, this);
startTime = m_uniformRandomVariable->GetInteger(0, 100);
uint32_t startTime = m_uniformRandomVariable->GetInteger(0, 100);
NS_LOG_DEBUG("Starting at time " << startTime << "ms");
m_htimer.Schedule(MilliSeconds(startTime));
}
Expand Down

0 comments on commit 4131d38

Please sign in to comment.