Bug 1889 - PointToPointNetDevive: In some cases MacTxDrop trace is not called

This commit is contained in:
Eugene Chemeritskiy
2014-03-26 23:39:32 +01:00
parent a88ee6e269
commit 7feb0b73c8
2 changed files with 11 additions and 17 deletions

View File

@@ -62,6 +62,7 @@ Bugs fixed
- Bug 1882 - int64x64 tests trigger valgrind bug
- Bug 1883 - IPv6 don't consider the prefix and network when choosing output address
- Bug 1887 - Point-to-point traces should contain PPP headers
- Bug 1889 - PointToPointNetDevive: In some cases MacTxDrop trace is not called
- Bug 1890 - UdpClientTrace: MPEG frame size is squeezed into (insufficient) 16 bit integer
- Bug 1891 - UdpSocketImpl::GetSockName doesn't return the IPv6 address

View File

@@ -493,33 +493,26 @@ PointToPointNetDevice::Send (
m_macTxTrace (packet);
//
// If there's a transmission in progress, we enque the packet for later
// transmission; otherwise we send it now.
// We should enqueue and dequeue the packet to hit the tracing hooks.
//
if (m_txMachineState == READY)
if (m_queue->Enqueue (packet))
{
//
// Even if the transmitter is immediately available, we still enqueue and
// dequeue the packet to hit the tracing hooks.
//
if (m_queue->Enqueue (packet) == true)
// If the channel is ready for transition we send the packet right now
//
if (m_txMachineState == READY)
{
packet = m_queue->Dequeue ();
m_snifferTrace (packet);
m_promiscSnifferTrace (packet);
return TransmitStart (packet);
}
else
{
// Enqueue may fail (overflow)
m_macTxDropTrace (packet);
return false;
}
}
else
{
return m_queue->Enqueue (packet);
return true;
}
// Enqueue may fail (overflow)
m_macTxDropTrace (packet);
return false;
}
bool