This commit is contained in:
Mathieu Lacage
2008-04-16 10:52:38 -07:00
2 changed files with 5 additions and 3 deletions

View File

@@ -695,6 +695,7 @@ bool TcpSocket::ProcessPacketAction (Actions_t a, Ptr<Packet> p,
// TCP SYN consumes one byte
m_nextRxSequence = tcpHeader.GetSequenceNumber() + SequenceNumber(1);
m_nextTxSequence = tcpHeader.GetAckNumber ();
m_firstPendingSequence = m_nextTxSequence; //bug 166
NS_LOG_DEBUG ("TcpSocket " << this << " ACK_TX_1" <<
" nextRxSeq " << m_nextRxSequence);
SendEmptyPacket (TcpHeader::ACK);

View File

@@ -111,9 +111,10 @@ ATTRIBUTE_HELPER_CPP (Address);
bool operator == (const Address &a, const Address &b)
{
NS_ASSERT (a.m_type == b.m_type ||
a.m_type == 0 ||
b.m_type == 0);
if (a.m_type != b.m_type)
{
return false;
}
NS_ASSERT (a.GetLength() == b.GetLength());
return memcmp (a.m_data, b.m_data, a.m_len) == 0;
}