From 3f4edebda6f5dffc382d779d556611ffd967d2f2 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Thu, 19 Jul 2007 08:43:43 +0200 Subject: [PATCH] remove 'now' events --- src/node/random-walk-2d-mobility-model.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/node/random-walk-2d-mobility-model.cc b/src/node/random-walk-2d-mobility-model.cc index b5181c3cb..9b85fed57 100644 --- a/src/node/random-walk-2d-mobility-model.cc +++ b/src/node/random-walk-2d-mobility-model.cc @@ -105,7 +105,7 @@ RandomWalk2dMobilityModel::RandomWalk2dMobilityModel () : m_parameters (RandomWalk2dMobilityModelParameters::GetCurrent ()) { SetInterfaceId (RandomWalk2dMobilityModel::iid); - Simulator::ScheduleNow (&RandomWalk2dMobilityModel::Start, this); + m_event = Simulator::ScheduleNow (&RandomWalk2dMobilityModel::Start, this); } void @@ -145,6 +145,7 @@ RandomWalk2dMobilityModel::DoWalk (Time delayLeft) NS_ASSERT (delay == delayLeft); m_event = Simulator::Schedule (delay, &RandomWalk2dMobilityModel::Start, this); } + NotifyCourseChange (); } void @@ -172,7 +173,7 @@ RandomWalk2dMobilityModel::DoSet (const Position &position) NS_ASSERT (position.IsInside (m_parameters->m_bounds)); m_helper.InitializePosition (position); Simulator::Remove (m_event); - Simulator::ScheduleNow (&RandomWalk2dMobilityModel::Start, this); + m_event = Simulator::ScheduleNow (&RandomWalk2dMobilityModel::Start, this); }