# HG changeset patch # User Raj Bhattacharjea # Date 1203021811 18000 # Node ID 7a0befeb4409ab130a69c45212284d025d4fac44 # Parent 1021234da54ee62194f3a19042ad36229a93ce97 Break a possibly infite recursion loop via a scheduler call (part of bug 131) diff -r 1021234da54e -r 7a0befeb4409 src/internet-node/tcp-socket.cc --- a/src/internet-node/tcp-socket.cc Thu Feb 14 19:01:01 2008 +0000 +++ b/src/internet-node/tcp-socket.cc Thu Feb 14 15:43:31 2008 -0500 @@ -752,11 +752,13 @@ bool TcpSocket::SendPendingData (bool wi m_tcp->SendPacket (p, header, m_endPoint->GetLocalAddress (), m_defaultAddress); - m_rtt->SentSeq(m_nextTxSequence, sz); // notify the RTT - NotifyDataSent (p->GetSize () ); // notify the application - nPacketsSent++; // Count sent this loop - m_nextTxSequence += sz; // Advance next tx sequence - m_highTxMark = std::max (m_nextTxSequence, m_highTxMark);// Note the high water mark + m_rtt->SentSeq(m_nextTxSequence, sz); // notify the RTT + // notify the application + Simulator::ScheduleNow(&TcpSocket::NotifyDataSent, this, p->GetSize ()); + nPacketsSent++; // Count sent this loop + m_nextTxSequence += sz; // Advance next tx sequence + // Note the high water mark + m_highTxMark = std::max (m_nextTxSequence, m_highTxMark); } NS_LOG_LOGIC ("Sent "<