Bug 731

Summary: Send function in point-to-point-net-device fails to check the return value of the Dequeue function
Product: ns-3 Reporter: Alberto Blanc <alberto.blanc>
Component: devicesAssignee: Craig Dowell <craigdo>
Status: RESOLVED FIXED    
Severity: normal CC: mathieu.lacage, ns-bugs, tomh
Priority: P5    
Version: ns-3-dev   
Hardware: All   
OS: All   
Attachments: patch to fix

Description Alberto Blanc 2009-10-26 05:44:36 UTC
In the Send function when the queue is empty (m_txMachineState == READY) a packet is queued and then immediately dequeued (comments explain that this is done in order to hit all the tracing hooks) but the return value of the Dequeue function is not checked.  If the Enqueue function decides to drop the packet the program exits with code -11 (while it's true that dropping a packet when it's the only one in the queue is probably not the most obvious solution, it is possible to come with cases where this could be reasonable).
Comment 1 Tom Henderson 2010-01-08 18:33:07 UTC
Created attachment 714 [details]
patch to fix

Craig, please review.  Passes all tests.
Comment 2 Faker Moatamri 2010-01-27 08:55:11 UTC
Craig please review and commit if ok.
Comment 3 Craig Dowell 2010-02-05 13:11:07 UTC
changeset bd6c06ad0f41