Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use default config value for MTU.
[simgrid.git] / src / surf / ns3 / ns3_simulator.cc
index af1359b..07abf0c 100644 (file)
@@ -117,8 +117,7 @@ static void send_callback(Ptr<Socket> localSocket, uint32_t txSpace){
          return;
        }
 
          return;
        }
 
-       uint32_t packetSize = 1024;
-       uint32_t toWrite = min (mysocket->remaining, packetSize);
+       uint32_t toWrite = min (mysocket->remaining, txSpace);
        uint8_t *data = (uint8_t*)malloc(sizeof(uint8_t)*toWrite);
        int amountSent = localSocket->Send (&data[0], toWrite, 0);
        free (data);
        uint8_t *data = (uint8_t*)malloc(sizeof(uint8_t)*toWrite);
        int amountSent = localSocket->Send (&data[0], toWrite, 0);
        free (data);