[asterisk-commits] russell: branch group/sip_session_timers r95289 - /team/group/sip_session_tim...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Dec 28 19:20:14 CST 2007


Author: russell
Date: Fri Dec 28 19:20:13 2007
New Revision: 95289

URL: http://svn.digium.com/view/asterisk?view=rev&rev=95289
Log:
(issue #10665)
Patches: 
      chan_sip.memalloc.bugfix uploaded by rjain (license 226)

Modified:
    team/group/sip_session_timers/channels/chan_sip.c

Modified: team/group/sip_session_timers/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/group/sip_session_timers/channels/chan_sip.c?view=diff&rev=95289&r1=95288&r2=95289
==============================================================================
--- team/group/sip_session_timers/channels/chan_sip.c (original)
+++ team/group/sip_session_timers/channels/chan_sip.c Fri Dec 28 19:20:13 2007
@@ -6947,7 +6947,7 @@
 	}
 
 	/* Add Session-Timers related headers if the feature is active for this session */
-	if (p->stimer->st_active == TRUE && p->stimer->st_active_peer_ua == TRUE) {
+	if (p->stimer && p->stimer->st_active == TRUE && p->stimer->st_active_peer_ua == TRUE) {
 		char se_hdr[256];
 		snprintf(se_hdr, sizeof(se_hdr), "%d;refresher=%s", p->stimer->st_interval, 
 			strefresher2str(p->stimer->st_ref));
@@ -15862,12 +15862,12 @@
 		/* The UAC did not request session-timers.  Asterisk (UAS), will now decide
 		(based on session-timer-mode in sip.conf) whether to run session-timers for
 		this session or not. */
-		p->stimer->st_active_peer_ua = FALSE;
 		switch (st_get_mode(p)) {
 			case SESSION_TIMER_MODE_ORIGINATE:
 				st_active = TRUE;
 				st_interval = st_get_se(p, TRUE);
 				st_ref = SESSION_TIMER_REFRESHER_UAS;
+				p->stimer->st_active_peer_ua = FALSE;
 				break;
 
 			default:




More information about the asterisk-commits mailing list