[reSIProcate] About sending MESSAGE fail
Scott Godin
slgodin at icescape.com
Wed Nov 2 07:54:30 CST 2005
You should just be able to call ClientPagerMessageHandle->end() in your onFailure callback. There were problems though if you call end() twice, and if you had queued messages failing, it may be difficult for an app to make sure it only calls end() once - so I've just submitted a fix that will harmlessly allow end to be called multiple times.
In short - with the new code in SVN head - you should be able to just call ClientPageMessageHandle->end() from your onFailure handler.
Scott
> -----Original Message-----
> From: resiprocate-devel-bounces at list.sipfoundry.org [mailto:resiprocate-
> devel-bounces at list.sipfoundry.org] On Behalf Of ???
> Sent: Tuesday, November 01, 2005 10:59 PM
> To: resiprocate-devel
> Subject: [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 at sict.ac.cn
> 2005-11-02
More information about the resiprocate-devel
mailing list