ccrtp-devel
[Top][All Lists]
Advanced

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

Re: [Ccrtp-devel] ccrtp library crash..help


From: fedemp
Subject: Re: [Ccrtp-devel] ccrtp library crash..help
Date: Thu, 25 Nov 2004 09:58:33 +0100 (CET)
User-agent: SquirrelMail/1.4.3a

Yes, there is a silly bug in forgetDestination. It is fixed in CVS but
not in currently available tarballs. The fix is:

--- src/outqueue.cpp    21 Apr 2004 16:59:54 -0000      1.10
+++ src/outqueue.cpp    22 Nov 2004 12:33:17 -0000      1.11
@@ -112,8 +112,11 @@
                        result = true;
                        if ( prev )
                                prev->setNext(ta->getNext());
+                       if ( getFirstDestination() == ta )
+                               firstDestination = NULL;
                        destinationCounter--;
                        delete ta;
+                       ta = NULL;
                } else {
                        prev = ta;
                        ta = ta->getNext();


> Hi, all.
> It seems to be some PB in <forgetDestination()> function in outqueue
> classs.
> it is always crash and core dump.
> ====================================================
> bool
> DestinationListHandler::removeDestinationFromList(const InetAddress& ia,
>                     tpport_t dataPort,
>                     tpport_t controlPort)
> {
>    bool result = false;
>    TransportAddress* prev = NULL;
>    writeLockDestinationList();
>    TransportAddress* ta = getFirstDestination();
>    while ( NULL != ta ) {
>       if ( ia == ta->getNetworkAddress() &&
>            dataPort == ta->getDataTransportPort() &&
>            controlPort == ta->getControlTransportPort() ) {
>          // matches. -> remove it.
>          result = true;
>          if ( prev )
>             prev->setNext(ta->getNext());
>          destinationCounter--;
>          delete ta;
>       } else {
>          prev = ta;
>          ta = ta->getNext();
>       }
>    }
>    unlockDestinationList();
>    return result;
> }
> ===================================================
>
> please let me know about it......................
>
> thanks ..
>
>
> _______________________________________________
> 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]