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

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

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

revision 3293 by derek, Tue Aug 31 00:10:21 2004 UTC revision 3295 by derek, Tue Aug 31 21:52:23 2004 UTC
# Line 8  Line 8 
8  #include "resiprocate/dum/UsageUseException.hxx"  #include "resiprocate/dum/UsageUseException.hxx"
9  #include "resiprocate/os/Logger.hxx"  #include "resiprocate/os/Logger.hxx"
10  #include "resiprocate/os/Timer.hxx"  #include "resiprocate/os/Timer.hxx"
11    #include "resiprocate/os/Inserter.hxx"
12    
13  #if defined(WIN32) && defined(_DEBUG) &&defined(LEAK_CHECK)// Used for tracking down memory leaks in Visual Studio  #if defined(WIN32) && defined(_DEBUG) &&defined(LEAK_CHECK)// Used for tracking down memory leaks in Visual Studio
14  #define _CRTDBG_MAP_ALLOC  #define _CRTDBG_MAP_ALLOC
# Line 355  Line 356 
356                       }                       }
357                       if (offans.first != None)                       if (offans.first != None)
358                       {                       {
                         incomingSdp(msg, offans.second);  
359                          if (offans.first == Answer)                          if (offans.first == Answer)
360                          {                          {
361                             //no late media required, so just send the ACK                             //no late media required, so just send the ACK
362                             send(makeAck());                             send(makeAck());
363                          }                          }
364                            incomingSdp(msg, offans.second);
365                       }                       }
366                       else                       else
367                       {                       {
368                            //no offer or answer in 200, this will eventually be
369                            //legal with PRACK/UPDATE
370                            send(makeAck());
371                          if (mOfferState != Answered)                          if (mOfferState != Answered)
372                          {                          {
373                             //reset the sdp state machine                             //reset the sdp state machine
# Line 759  Line 763 
763  void  void
764  InviteSession::send()  InviteSession::send()
765  {  {
766     if (mOfferState == Answered)     InfoLog ( << "InviteSession::send(void)");  
767       if (mOfferState == Answered || mState != Connected)
768     {     {
769        throw new UsageUseException("Cannot call send when there it no Offer/Answer negotiation to do", __FILE__, __LINE__);        throw new UsageUseException("Cannot call send when there it no Offer/Answer negotiation to do", __FILE__, __LINE__);
770     }     }
# Line 772  Line 777 
777     InfoLog ( << "InviteSession::makeAck" );     InfoLog ( << "InviteSession::makeAck" );
778    
779     int cseq = mLastRequest.header(h_CSeq).sequence();     int cseq = mLastRequest.header(h_CSeq).sequence();
780       if (mAckMap.find(cseq) != mAckMap.end())
781       {
782          InfoLog ( << "CSeq collision in ack map: " << Inserter(mAckMap) );
783       }
784          
785     assert(mAckMap.find(cseq) == mAckMap.end());     assert(mAckMap.find(cseq) == mAckMap.end());
786     SipMessage& ack = mAckMap[cseq];     SipMessage& ack = mAckMap[cseq];
787     ack = mLastRequest;     ack = mLastRequest;

Legend:
Removed from v.3293  
changed lines
  Added in v.3295

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27