From: Lucas Schnorr Date: Wed, 7 Sep 2011 14:04:37 +0000 (+0200) Subject: Dirty hack to make sure that all callbacks of a flows that finish exactly at the... X-Git-Tag: v3_6_2~119 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/7d0421bd87d5d3ceb1345ce3ecf1e21cc4753060?ds=sidebyside 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. --- 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(); } }