ccrtp-devel
[Top][All Lists]
Advanced

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

Re: [Ccrtp-devel] addDestination/delDestination bug


From: Federico Montesino Pouzols
Subject: Re: [Ccrtp-devel] addDestination/delDestination bug
Date: Mon, 28 Feb 2005 16:10:33 +0100
User-agent: Mutt/1.5.6+20040907i

Hi, I think there is a bug in the destinations list. Here you are the
fix:

------
112,113c112,115
<                       if ( getFirstDestination() == ta )
<                               firstDestination = NULL;
---
>                       else // ( getFirstDestination() == ta )
>                               firstDestination = firstDestination->getNext();
>                       if ( lastDestination == ta )
>                               lastDestination = prev;
------

I'll fix it in CVS. That's the risk of handcrafted lists :). It is not
the only linked list that is implemented from scratch inside ccRTP. In
general, the idea behind not using std::list and other std:: was
avoiding performance loss (both speed and size). Some of the lists in
ccRTP are quite minimal and some others are quite specialized and
would not directly fit in any std::. These structures are used
frequently enough so as to try to optimize them as much as possible.

Actually, the only std:: used in ccRTP is string, and I would like to
replace it soon with the commmonc++ String.

On Sun, Feb 27, 2005 at 09:55:01PM -0500, Dan Weber wrote:
> 
> 
> On Sun, 27 Feb 2005, Dan Weber wrote:
> 
> >I've found an interesting bug while designing a music on hold application 
> >using this stack. The bug is found in the following procedure:
> >
> >addDestination: assert works
> >delDestination: assert works
> >addDestination: assert works
> >delDestination: assert fails
> >
> >I first noticed this while putting someone on hold twice in the same call.
> >
> This isn't limited to putting people on hold twice, but to adding and 
> removing other calls.  I looked into this myself, and I saw a handcrafted 
> implementation of a linkedlist.  Is there any reason why you aren't using 
> a std::list?  Can someone look into this?
> 
> Dan
> 
> 
> _______________________________________________
> Ccrtp-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/ccrtp-devel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]