Restore tcp example to full size, also a bugfix
authorRaj Bhattacharjea <raj.b@gatech.edu>
Fri, 06 Jun 2008 16:10:54 -0400
changeset 3255 ba3b5024f6a6
parent 3254 c3f792428d62
child 3256 11a21b053e95
Restore tcp example to full size, also a bugfix
examples/tcp-large-transfer.cc
src/internet-node/pending-data.cc
--- a/examples/tcp-large-transfer.cc	Fri Jun 06 14:19:05 2008 -0400
+++ b/examples/tcp-large-transfer.cc	Fri Jun 06 16:10:54 2008 -0400
@@ -139,7 +139,7 @@
   //
   ///////////////////////////////////////////////////////////////////////////
 
-  int nBytes = 200000;
+  int nBytes = 2000000;
   uint16_t servPort = 50000;
 
   // Create a packet sink to receive these packets
@@ -195,7 +195,6 @@
 {
   // Perform series of 1040 byte writes (this is a multiple of 26 since
   // we want to detect data splicing in the output stream)
-  std::cout << "nBytes = " <<nBytes <<"@"<<Simulator::Now().GetSeconds()<<std::endl;
   uint32_t writeSize = 1040;
   uint8_t data[writeSize];
   while (nBytes > 0) {
--- a/src/internet-node/pending-data.cc	Fri Jun 06 14:19:05 2008 -0400
+++ b/src/internet-node/pending-data.cc	Fri Jun 06 16:10:54 2008 -0400
@@ -167,7 +167,7 @@
             }
           else
             {
-              if (count > o + s1)
+              if (count >= o + s1)
                 {
                   end = i;
                   Ptr<Packet> toFragment = data[end];
@@ -183,7 +183,7 @@
           outPacket->AddAtEnd (data[i]);
         }
       outPacket->AddAtEnd(endFragment);
-      NS_ASSERT(outPacket->GetSize() == s);
+      NS_ASSERT(outPacket->GetSize() == s1);
       return outPacket;
     }
   else