From 7d0421bd87d5d3ceb1345ce3ecf1e21cc4753060 Mon Sep 17 00:00:00 2001 From: Lucas Schnorr Date: Wed, 7 Sep 2011 16:04:37 +0200 Subject: [PATCH] Dirty hack to make sure that all callbacks of a flows that finish exactly at the same time are called. Otherwise, only the first callback is called and the status of the other finishing flow is not updated. --- src/surf/ns3/ns3_simulator.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/surf/ns3/ns3_simulator.cc b/src/surf/ns3/ns3_simulator.cc index 199d6c68d6..8e25eba209 100644 --- a/src/surf/ns3/ns3_simulator.cc +++ b/src/surf/ns3/ns3_simulator.cc @@ -109,7 +109,8 @@ static void receive_callback(Ptr localSocket){ mysocket->finished = 1; // cout << "[" << Simulator::Now ().GetSeconds() << "] " << "recv_cb of F[" << mysocket->totalBytes << "] " << endl; XBT_DEBUG("Stop simulator at %f seconds", Simulator::Now().GetSeconds()); - Simulator::Stop(); + Simulator::Stop(Seconds(0.0)); + Simulator::Run(); } } -- 2.20.1