Bug 460 - ListPositionAllocator bug
ListPositionAllocator bug
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: mobility models
ns-3-dev
PC Linux
: P1 normal
Assigned To: Mathieu Lacage
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-07 12:25 UTC by Mauro Tortonesi
Modified: 2009-01-09 02:35 UTC (History)
1 user (show)

See Also:


Attachments
patch from mailing list (433 bytes, patch)
2009-01-09 02:28 UTC, Mathieu Lacage
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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