/[resiprocate]/main/resip/dum/Dialog.cxx
ViewVC logotype

Diff of /main/resip/dum/Dialog.cxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3750 by derek, Sat Dec 11 04:23:25 2004 UTC revision 3934 by jason, Wed Mar 2 22:52:10 2005 UTC
# Line 250  Line 250 
250  }  }
251    
252  void  void
253    Dialog::handleTargetRefresh(const SipMessage& msg)
254    {
255       switch(msg.header(h_CSeq).method())
256       {
257          case INVITE:
258          case UPDATE:
259             if (msg.isRequest() || (msg.isResponse() && msg.header(h_StatusLine).statusCode()/100 == 2))
260             {
261                //?dcm? modify local target; 12.2.2 of 3261 implies that the remote
262                //target is immediately modified.  Should we wait until a 2xx class
263                //reponse is sent to a re-invite(easy when all send requests go
264                //through Dialog)
265                if (msg.exists(h_Contacts))
266                {
267                   //.dcm. replace or check then replace
268                   mRemoteTarget = msg.header(h_Contacts).front();
269                }
270             }
271             break;
272          default:
273             return;
274       }
275    }
276    
277    void
278  Dialog::dispatch(const SipMessage& msg)  Dialog::dispatch(const SipMessage& msg)
279  {  {
280     DebugLog ( << "Dialog::dispatch: " << msg.brief());     DebugLog ( << "Dialog::dispatch: " << msg.brief());
281       handleTargetRefresh(msg);
282     if (msg.isRequest())     if (msg.isRequest())
283     {     {
284        const SipMessage& request = msg;        const SipMessage& request = msg;
# Line 334  Line 360 
360              {              {
361                 InfoLog (<< "Received an in dialog refer in a non-invite dialog: " << request.brief());                 InfoLog (<< "Received an in dialog refer in a non-invite dialog: " << request.brief());
362                 SipMessage failure;                 SipMessage failure;
363                 makeResponse(failure, request, 405);                 makeResponse(failure, request, 603);
364                 mDum.sendResponse(failure);                 mDum.sendResponse(failure);
365                 return;                 return;
366              }              }
# Line 1047  Line 1073 
1073  void  void
1074  Dialog::forked(const SipMessage& msg)  Dialog::forked(const SipMessage& msg)
1075  {  {
1076     assert(msg.isResponse() && msg.header(h_StatusLine).statusCode() < 200);     assert(msg.isResponse() && msg.header(h_StatusLine).statusCode() < 300);
1077    
1078     ClientInviteSession* uac = dynamic_cast<ClientInviteSession*>(mInviteSession);     ClientInviteSession* uac = dynamic_cast<ClientInviteSession*>(mInviteSession);
1079     if (uac)     if (uac)
# Line 1065  Line 1091 
1091        uac->cancel();        uac->cancel();
1092     }     }
1093  }  }
1094    

Legend:
Removed from v.3750  
changed lines
  Added in v.3934

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27