/[resiprocate]/main/sip/resiprocate/dum/InviteSession.cxx
ViewVC logotype

Diff of /main/sip/resiprocate/dum/InviteSession.cxx

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

revision 2996 by derek, Tue Jun 15 19:41:56 2004 UTC revision 2997 by derek, Wed Jun 16 01:08:25 2004 UTC
# Line 109  Line 109 
109     {     {
110        case Terminated:        case Terminated:
111           //!dcm! -- 481 behaviour here, should pretty much die on anything           //!dcm! -- 481 behaviour here, should pretty much die on anything
112           if (msg.isResponse() && msg.header(h_StatusLine).statusCode() == 200 && msg.header(h_CSeq).method() == BYE)           //eventually 200 to BYE could be handled further out
113             if (msg.isResponse())
114           {           {
115                int code = msg.header(h_StatusLine).statusCode();
116                if ((code  == 200 && msg.header(h_CSeq).method() == BYE) || code > 399)
117                {
118                   mDum.mInviteSessionHandler->onTerminated(getSessionHandle(), msg);      
119              delete this;              delete this;
120           }           }
121             }
122           break;           break;
123        case Connected:        case Connected:
124           // reINVITE           // reINVITE
# Line 168  Line 174 
174           }           }
175           else           else
176           {           {
177              assert(0); // !dcm! -- usual nonsence message behaviour question                          ErrLog ( << "Spurious message sent to UAS " << msg );            
178                return;            
179           }           }
180           break;                   break;        
181        default:        default:
# Line 188  Line 195 
195  {  {
196     switch (mState)     switch (mState)
197     {     {
198          InfoLog ( << "InviteSession::end, state: " << mState);  
199    
200        case Terminated:        case Terminated:
201           throw UsageUseException("Cannot end a session that has already been cancelled.", __FILE__, __LINE__);           throw UsageUseException("Cannot end a session that has already been cancelled.", __FILE__, __LINE__);
202           break;           break;
203        case Connected:        case Connected:
204             InfoLog ( << "InviteSession::end, connected state" );  
205           mDialog.makeRequest(mLastRequest, BYE);           mDialog.makeRequest(mLastRequest, BYE);
206           //new transaction           //new transaction
207           assert(mLastRequest.header(h_Vias).size() == 1);           assert(mLastRequest.header(h_Vias).size() == 1);
# Line 306  Line 316 
316           {           {
317              msg.setContents(static_cast<SdpContents*>(mNextOfferOrAnswerSdp->clone()));              msg.setContents(static_cast<SdpContents*>(mNextOfferOrAnswerSdp->clone()));
318              sendSdp(mNextOfferOrAnswerSdp);              sendSdp(mNextOfferOrAnswerSdp);
319                mNextOfferOrAnswerSdp = 0;            
320           }           }
321           mDum.send(msg);           mDum.send(msg);
322        }        }
# Line 456  Line 467 
467     {     {
468        mAck.setContents(static_cast<SdpContents*>(mNextOfferOrAnswerSdp->clone()));        mAck.setContents(static_cast<SdpContents*>(mNextOfferOrAnswerSdp->clone()));
469        sendSdp(mNextOfferOrAnswerSdp);        sendSdp(mNextOfferOrAnswerSdp);
470          mNextOfferOrAnswerSdp = 0;
471     }     }
472    
473     InfoLog ( << "InviteSession::makeAck:after: " << mAck );       InfoLog ( << "InviteSession::makeAck:after: " << mAck );  

Legend:
Removed from v.2996  
changed lines
  Added in v.2997

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27