< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index  

RE: [reSIProcate] redelete in TransactionState.cxx ?


I committed solution #2, but it should be double-checked.

--Derek
> -----Original Message-----
> From: Scott Godin [mailto:slgodin@xxxxxxxxxxxx]
> Sent: Monday, April 25, 2005 1:54 PM
> To: 'Derek@xxxxxxxx'
> Subject: FW: [reSIProcate] redelete in TransactionState.cxx ?
> 
> 
> 
> -----Original Message-----
> From: Scott Godin
> Sent: Thursday, April 14, 2005 8:59 AM
> To: Jason Fischl; 'david Butcher'; 'Derek@xxxxxxxx'; 'Alan Hawrylyshen'
> Cc: 'zuobf@xxxxxxxxxxxxxxx'; Scott Godin
> Subject: FW: [reSIProcate] redelete in TransactionState.cxx ?
> 
> I'm looking at fixing this issue - but I must admit - I'm no export on the
> TransactionState stuff.  I'm thinking of the following 2 alternatives for
> a
> fix both in TransactionState::processStateless(...)
> 
> Solution 1:
> Just remove the delete this:  If there are further DNS results to try then
> transaction state will not be deleted (is that right) - otherwise if no
> more
> DnsResults the state will be deleted in processNoDnsResults.
> 
> TransactionState::processStateless(TransactionMessage* message):
> ......
>    else if (isTransportError(message))
>    {
>       processTransportFailure();
> 
>       delete message;
>       //delete this;
>    }
> ......
> 
> 
> OR Solution 2:
> 
> In processNoDnsResults check if mMachine == Stateless for calling "delete
> this".
> TransactionState::processNoDnsResults():
> ......
>    terminateClientTransaction(mId);
>    if(mMachine != Stateless)
>    {
>       delete this;
>    }
> ......
> 
> I'm not sure how this effects TransactionState::handle(DnsResult* result)
> function though when processNoDnsResults is called.
> 
> Can you guys suggest which fix is better - or another alternative?
> 
> Thanks,
> 
> Scott
> 
> 
> -----Original Message-----
> From: zuobf [mailto:zuobf@xxxxxxxxxxxxxxx]
> Sent: Wednesday, April 13, 2005 5:13 AM
> To: resiprocate-devel
> Subject: [reSIProcate] redelete in TransactionState.cxx ?
> 
> resiprocate-devel,hi!
>       I encountered a redelete problem during running test program
> testClient.
> The scenario is :
>      When you are going to send an ACK request and there is a transport
> error,
> there is a possibility of redelete the TransactionState object.
> In function TransactionState::processStateless(TransactionMessage*
> message):
> ......
>    else if (isTransportError(message))
>    {
>       processTransportFailure();
> 
>       delete message;
>       delete this;
>    }
> ......
> In function TransactionState::processTransportFailure():
> ......
> 
>          case DnsResult::Finished:
>             processNoDnsResults();
> ......
> In function TransactionState::processNoDnsResults():
> ......
>    terminateClientTransaction(mId);
>    delete this;
> ......
> 
>       If the stack is:
>     TransactionState::processStateless -->
> TransactionState::processTransportFailure() -->
>     TransactionState::processTransportFailure()
>       then the delete for same object will be called twice.
> 
>       And i really encountered this problem, I run testClient in a board
> with IP 192.168.10.94
> with arguments <<testClient LOG_STACK
> "sip:wosai@xxxxxxxxxxxxxx;transport=udp">>, the target
> machine is configured with two interfaces, and i don't know why, returned
> a
> contact with
> another interface 192.168.101.111, then after redelete the same object,
> the
> testClient program
> terminated with an error:
> C++ runtime abort: a pure virtual function was called
> 
>       How to modify?
>       Thanks.
> 
>         sincerely,
> 
> 
>         zuobf
>         zuobf@xxxxxxxxxxxxxxx
>           2005-04-13