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

RE: [reSIProcate] About sending MESSAGE fail


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@xxxxxxxxxxxxxxxxxxx [mailto:resiprocate-
> devel-bounces@xxxxxxxxxxxxxxxxxxx] 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@xxxxxxxxxx
>           2005-11-02