[reSIProcate] About sending MESSAGE fail
Hello ,everyone,
I want to release reource quickly when i recive failed
response for MESSAGE,so I add mDum.destroy(this)
in ClientPagerMessage::dispatch(const SipMessage& msg) ,it works well .
I don't kown whether it's right.
Any help will be so appreciated! :)
ClientPagerMessage::dispatch(const SipMessage& msg)
{
....
else
{
SipMessage errResponse;
MsgQueue::iterator contents;
for(contents = mMsgQueue.begin(); contents != mMsgQueue.end();
++contents)
{
Contents* p = *contents;
WarningLog ( << "Paging failed" << *p );
Helper::makeResponse(errResponse, mRequest, code);
handler->onFailure(getHandle(), errResponse,
std::auto_ptr<Contents>(p));
*contents = 0;
}
mMsgQueue.clear();
mDum.destroy(this); // MODIFY ADD
}
}
致
礼!
贾军营
jiajunying@xxxxxxxxxx
2005-11-02