Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[NS3] cosmetics, fixing indentation on simulator code
authorLucas Schnorr <Lucas.Schnorr@imag.fr>
Fri, 2 Sep 2011 14:05:08 +0000 (16:05 +0200)
committerLucas Schnorr <Lucas.Schnorr@imag.fr>
Mon, 5 Sep 2011 09:08:12 +0000 (11:08 +0200)
src/surf/ns3/ns3_simulator.cc

index 0a2e4a5..258c43d 100644 (file)
@@ -127,18 +127,18 @@ static void send_callback(Ptr<Socket> 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){
        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;
          (mysocket->remaining) -= amountSent;
          //cout << "[" << Simulator::Now ().GetSeconds() << "] " << "Send one packet, remaining "<<  mysocket->remaining << " bytes!" << endl;
-    }
+       }
        if ((mysocket->sentBytes) >= totalBytes){
                localSocket->Close();
        }
        if ((mysocket->sentBytes) >= totalBytes){
                localSocket->Close();
        }