bug 217: Handle gracefully the case where a packet aggregated contains nothing.

This commit is contained in:
Mathieu Lacage
2008-06-20 15:06:23 -07:00
parent 4743c2ff7c
commit da514b5edb

View File

@@ -726,6 +726,12 @@ PacketMetadata::AddAtEnd (PacketMetadata const&o)
*this = o;
return;
}
if (o.m_head == 0xffff)
{
NS_ASSERT (o.m_tail == 0xffff);
// we have nothing to append.
return;
}
NS_ASSERT (m_head != 0xffff && m_tail != 0xffff);
// We read the current tail because we are going to append