Module: sems
Branch: master
Commit: fe7e188ed21758ddd2eb9cf476895e9d8ca568e7
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=fe7e188ed21758ddd2eb9cf476895e9d8ca568e7

Author: Stefan Sayer <[email protected]>
Committer: Stefan Sayer <[email protected]>
Date:   Fri Feb 11 04:04:03 2011 +0100

optimization: remove SST timers when sending BYE

---

 core/plug-in/session_timer/SessionTimer.cpp |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/core/plug-in/session_timer/SessionTimer.cpp 
b/core/plug-in/session_timer/SessionTimer.cpp
index e89da7a..ffaef8c 100644
--- a/core/plug-in/session_timer/SessionTimer.cpp
+++ b/core/plug-in/session_timer/SessionTimer.cpp
@@ -91,13 +91,18 @@ bool SessionTimer::onSendRequest(const string& method,
                                 int flags,
                                 unsigned int cseq)
 {
+  if (method == "BYE") {
+    removeTimers(s);
+    return false;
+  }
+
   string m_hdrs = SIP_HDR_COLSP(SIP_HDR_SUPPORTED)  "timer"  CRLF;
   if  ((method != SIP_METH_INVITE) && (method != SIP_METH_UPDATE))
     goto end;
-  
+
   m_hdrs += SIP_HDR_COLSP(SIP_HDR_SESSION_EXPIRES) + int2str(session_interval) 
+CRLF
     + SIP_HDR_COLSP(SIP_HDR_MIN_SE) + int2str(min_se) + CRLF;
-  
+
  end:
   hdrs += m_hdrs;
   return false;

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to