[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ns] Bug in rtqueue.cc




Hi NS users,

There is a bug in rtqueue.cc that is triggered when NS is compiled with
the NDEBUG macro defined during preprocessing. In line 147, remove_head()
is called inside an assert(...) statement and is therefor left out if
compiled with -DNDEBUG, which autoconf in some cases chooses to do.

The effect is that the simulation loops forever, printing the same line to
the trace file when e.g. AODV flushes queued packets due to route request
timeout.

diff -r1.1.1.1 rtqueue.cc
147c147,148
<                 assert(p == remove_head());
---
>               Packet *oldhead = remove_head();
>               assert(p == oldhead);


-- 
Lars Christensen, [email protected]