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 > [email protected] > http://lists.gnu.org/mailman/listinfo/ccrtp-devel _______________________________________________ Ccrtp-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/ccrtp-devel
