Bug 460

Summary: ListPositionAllocator bug
Product: ns-3 Reporter: Mauro Tortonesi <mauro.tortonesi>
Component: mobility modelsAssignee: Mathieu Lacage <mathieu.lacage>
Status: RESOLVED FIXED    
Severity: normal CC: mauro.tortonesi
Priority: P1    
Version: ns-3-dev   
Hardware: PC   
OS: Linux   
Attachments: patch from mailing list

Description Mauro Tortonesi 2009-01-07 12:25:55 UTC
Dear NS3 developers,

my colleague Stefano Formaggi and I have found a bug in the ListPositionAllocator code. 

When the ListPositionAllocator::GetNext method is called after the list of  positions provided by the user is finished, it returns uninitialized values.

The patch in attachment fixes the problem by reinitializing the m_current iterator when it reaches the end of m_position. It applies on both ns-3.3 and current ns-3-dev trunk.


Mauro Tortonesi
Comment 1 Rajib Bhattacharjea 2009-01-07 15:44:22 UTC
Reassigning to the maintainer for review and application.
Comment 2 Mathieu Lacage 2009-01-09 02:26:43 UTC
There is no attachement ?
Comment 3 Mathieu Lacage 2009-01-09 02:28:03 UTC
Created attachment 347 [details]
patch from mailing list
Comment 4 Mathieu Lacage 2009-01-09 02:35:20 UTC
I checked in a slightly modified version (coding style).

thanks a lot !

changeset: 6f982d5f7b54