X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b969c14b66a498dbe7562cec4fbc5747b2d988d7..29cedcb0af274d0dd82224451767e8d01162d734:/src/surf/ns3/ns3_simulator.cc diff --git a/src/surf/ns3/ns3_simulator.cc b/src/surf/ns3/ns3_simulator.cc index df043f241c..de44c3858a 100644 --- a/src/surf/ns3/ns3_simulator.cc +++ b/src/surf/ns3/ns3_simulator.cc @@ -61,7 +61,7 @@ void NS3Sim::create_flow_NS3( double start, const char *addr, uint32_t totalBytes, - void * action) + simgrid::surf::NetworkNS3Action * action) { if(!dict_socket) dict_socket = xbt_dict_new_homogeneous(delete_mysocket); @@ -76,9 +76,6 @@ void NS3Sim::create_flow_NS3( MySocket *mysocket = new MySocket(); mysocket->totalBytes = totalBytes; mysocket->remaining = totalBytes; - mysocket->bufferedBytes = 0; - mysocket->sentBytes = 0; - mysocket->finished = 0; mysocket->action = action; transformSocketPtr(sock); @@ -105,8 +102,8 @@ static MySocket* get_my_socket(Ptr localSocket) { static void receive_callback(Ptr localSocket){ MySocket* mysocket = get_my_socket(localSocket); - if (mysocket->finished == 0){ - mysocket->finished = 1; + if (mysocket->finished == false){ + mysocket->finished = true; XBT_DEBUG("recv_cb of F[%p, %p, %d]", mysocket, mysocket->action, mysocket->totalBytes); XBT_DEBUG("Stop simulator at %f seconds", Simulator::Now().GetSeconds()); Simulator::Stop(Seconds(0.0));