From ba57aff9532c5e6290281bd599ee37d371181e10 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Sat, 26 Dec 2009 15:47:01 +0100 Subject: [PATCH] Make sure that traffic generation events are associated with a context --- scratch/simple.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scratch/simple.cc b/scratch/simple.cc index 92c6e5c36..a5f408ba5 100644 --- a/scratch/simple.cc +++ b/scratch/simple.cc @@ -57,7 +57,9 @@ RunSimulation (void) InetSocketAddress remote = InetSocketAddress (Ipv4Address::GetLoopback (), 80); source->Connect (remote); - GenerateTraffic (source, 500); + Simulator::ScheduleWithContext (source->GetNode ()->GetId (), + Seconds (0.0), + &GenerateTraffic, source, 500); PrintTraffic (sink);