--- a/RELEASE_NOTES Wed Mar 26 23:20:13 2014 +0100
+++ b/RELEASE_NOTES Wed Mar 26 23:39:32 2014 +0100
@@ -62,6 +62,7 @@
- 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
--- a/src/point-to-point/model/point-to-point-net-device.cc Wed Mar 26 23:20:13 2014 +0100
+++ b/src/point-to-point/model/point-to-point-net-device.cc Wed Mar 26 23:39:32 2014 +0100
@@ -493,33 +493,26 @@
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))
{
+ //
+ // If the channel is ready for transition we send the packet right now
//
- // 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 (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;
- }
+ return true;
}
- else
- {
- return m_queue->Enqueue (packet);
- }
+
+ // Enqueue may fail (overflow)
+ m_macTxDropTrace (packet);
+ return false;
}
bool