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

[reSIProcate] DUM shutdown message processing


Hi, all,

It seems that DUM doesnot handle ShutdownMessage
posted by SipStack::shutdown():

void
TransactionController::process(FdSet& fdset)
{
   if (mShuttingDown && 
       //mTimers.empty() && 
       !mStateMacFifo.messageAvailable() && 
       !mTUFifo.messageAvailable() &&
       mTransportSelector.isFinished())
   {
      mTUFifo.add(new ShutdownMessage);
   }
...
}

For application running sip stack in a separated
thread by calling DialogUsageManager::process(true),
this is essential to cleanly shutdown the DUM. The
proposed way to do that looks like as following:

DialogUsageManager::process(bool separateThread)
{
....
  ShutdownMessage* shutdownMsg =
dynamic_cast<ShutdownMessage*>(msg.get());
  if (ShutdownMessage)
  {
      mShutdownHandler->onDumCanBeDeleted();
  }
....
}

Is that right? Any comments are welcome.

Regards,

kaiduan
 

______________________________________________________________________ 
Post your free ad now! http://personals.yahoo.ca