RE: [reSIProcate] Another question on KeepAlive
The dynamic cast is a way of testing the message type here. If it
returns NULL as indicated by you, that means the message is not a
KeepAliveMessage.
There are SetKeepAliveTime<Datagram/Stream> in Profile that you can use
to control the frequency of KeepAlive message, I believe.
But for your case, if the connection drops after 5 seconds, I think it
is something else.
Hong
-----Original Message-----
From: John Draper [mailto:lists@xxxxxxxxxxxxxxxx]
Sent: Wednesday, May 03, 2006 3:19 AM
To: Resip Devel
Subject: [reSIProcate] Another question on KeepAlive
Hi,
In my sleuthing around, I discovered the following....
void
TransactionState::process(TransactionController& controller)
{
TransactionMessage* message = controller.mStateMacFifo.getNext();
{
KeepAliveMessage* keepAlive =
dynamic_cast<KeepAliveMessage*>(message);
if (keepAlive)
{
InfoLog ( << "Sending keep alive to: " <<
keepAlive->getDestination());
controller.mTransportSelector.transmit(keepAlive,
keepAlive->getDestination());
delete keepAlive;
return;
}
}
< more stuff deleted >
I stopped at the "if keepAlive" - then checked the following variables
message is 0x887ae00
keepAlive = 0x0
Shouldn't the keepAlive be the same pointer as "message", only it's just
dynamic casted?
Is there something I overlooked? Could the compiler be messed up?
So the "if" never takes....
I'm trying to dig through the code and backtrack to find out why the
"keepAlive" is 0x0
With the eventual goal of turning on the KeepAlives.
John