Module: sems Branch: mgw/dsm Commit: dab65232ec2a2568fc8f84a21c6addd25373df18 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=dab65232ec2a2568fc8f84a21c6addd25373df18
Author: Stefan Sayer <[email protected]> Committer: Stefan Sayer <[email protected]> Date: Fri Dec 10 05:42:49 2010 +0100 sst: b/f: timers headers only in 2xx reply --- core/plug-in/session_timer/SessionTimer.cpp | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/plug-in/session_timer/SessionTimer.cpp b/core/plug-in/session_timer/SessionTimer.cpp index fc9283f..e89da7a 100644 --- a/core/plug-in/session_timer/SessionTimer.cpp +++ b/core/plug-in/session_timer/SessionTimer.cpp @@ -110,10 +110,12 @@ bool SessionTimer::onSendReply(const AmSipRequest& req, string& hdrs, int flags) { - string m_hdrs = SIP_HDR_COLSP(SIP_HDR_SUPPORTED) "timer" CRLF; - if ((req.method != SIP_METH_INVITE) && (req.method != SIP_METH_UPDATE)) + if (((req.method != SIP_METH_INVITE) && (req.method != SIP_METH_UPDATE)) || + (code < 200) || (code >= 300)) return false; + string m_hdrs = SIP_HDR_COLSP(SIP_HDR_SUPPORTED) "timer" CRLF; + // only in 2xx responses to INV/UPD m_hdrs += SIP_HDR_COLSP(SIP_HDR_SESSION_EXPIRES) + int2str(session_interval) + ";refresher="+ _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
