From: Lucas Schnorr Date: Fri, 2 Sep 2011 14:05:08 +0000 (+0200) Subject: [NS3] cosmetics, fixing indentation on simulator code X-Git-Tag: v3_6_2~165 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/8fe73f754d3f13f61b20f57b94830e4d6e8c3946 [NS3] cosmetics, fixing indentation on simulator code --- diff --git a/src/surf/ns3/ns3_simulator.cc b/src/surf/ns3/ns3_simulator.cc index 0a2e4a58b3..258c43d6bd 100644 --- a/src/surf/ns3/ns3_simulator.cc +++ b/src/surf/ns3/ns3_simulator.cc @@ -127,18 +127,18 @@ static void send_callback(Ptr localSocket, uint32_t txSpace){ MySocket* mysocket = (MySocket*)xbt_dict_get_or_null(dict_socket,(char*)&localSocket); uint32_t totalBytes = mysocket->TotalBytes; while ((mysocket->sentBytes) < totalBytes && localSocket->GetTxAvailable () > 0){ - uint32_t toWrite = min ((mysocket->remaining), writeSize); - toWrite = min (toWrite, localSocket->GetTxAvailable ()); - int amountSent = localSocket->Send (&data[0], toWrite, 0); + uint32_t toWrite = min ((mysocket->remaining), writeSize); + toWrite = min (toWrite, localSocket->GetTxAvailable ()); + int amountSent = localSocket->Send (&data[0], toWrite, 0); - if(amountSent < 0) - return; + if(amountSent < 0) + return; - (mysocket->last_amount_sent) += amountSent; - (mysocket->sentBytes) += amountSent; + (mysocket->last_amount_sent) += amountSent; + (mysocket->sentBytes) += amountSent; (mysocket->remaining) -= amountSent; //cout << "[" << Simulator::Now ().GetSeconds() << "] " << "Send one packet, remaining "<< mysocket->remaining << " bytes!" << endl; - } + } if ((mysocket->sentBytes) >= totalBytes){ localSocket->Close(); }