[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] bug and patch for queue.h
Thanks for reporting the bug. It will be fixed in
tomorrow's snapshot.
Kun-chan Lan
On Wed, 15 Aug 2001, Neundorf Alexander wrote:
> Hi,
>
> an obvious bug with a simple fix (found in 2.1b7 and b8):
>
> queue.h:
>
> class PacketQueue
> {
> ...
> Packet* getNext()
> {
> Packet *tmp=iter;
> - iter=iter->next_;
> + if (iter!=0) iter=iter->next_;
> return tmp;
> };
>
> now I can use loops like
> resetIterator();
> for (Packet* p=getNext(); p!=0; p=getNext())
> { ... };
>
> Bye
> Alex
>
>