[reSIProcate] redelete in TransactionState.cxx ?
zuobf
zuobf at chinabizone.com
Wed Apr 13 04:13:09 CDT 2005
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 at 192.168.10.111;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 at chinabizone.com
2005-04-13
More information about the resiprocate-devel
mailing list