[asterisk-commits] mjordan: branch certified-11.2 r381446 - in /certified/branches/11.2: ./ chan...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Feb 14 12:41:25 CST 2013


Author: mjordan
Date: Thu Feb 14 12:41:21 2013
New Revision: 381446

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=381446
Log:
Fixed failing test from r380696.

When I added my extensive suite of session timer unit tests, apparently one of
them was failing and I never noticed. If neither Min-SE nor Session-Expires is
set in the header, it was responding with a Session-Expires of the global
maxmimum instead of the configured max for the endpoint.

(issue ASTERISK-20787)
........

Merged revisions 380973 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 380974 from http://svn.asterisk.org/svn/asterisk/branches/11

Modified:
    certified/branches/11.2/   (props changed)
    certified/branches/11.2/channels/chan_sip.c

Propchange: certified/branches/11.2/
------------------------------------------------------------------------------
--- branch-11-merged (original)
+++ branch-11-merged Thu Feb 14 12:41:21 2013
@@ -1,1 +1,1 @@
-/branches/11:378038,378287,378321,378409-378411,378582,378687,378690,378984,379513,379790,380465,380698,380892,380894,381306
+/branches/11:378038,378287,378321,378409-378411,378582,378687,378690,378984,379513,379790,380465,380698,380892,380894,380974,381306

Modified: certified/branches/11.2/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/certified/branches/11.2/channels/chan_sip.c?view=diff&rev=381446&r1=381445&r2=381446
==============================================================================
--- certified/branches/11.2/channels/chan_sip.c (original)
+++ certified/branches/11.2/channels/chan_sip.c Thu Feb 14 12:41:21 2013
@@ -24723,6 +24723,7 @@
 	int st_interval = 0;            /* Session-Timer negotiated refresh interval                */
 	enum st_refresher tmp_st_ref = SESSION_TIMER_REFRESHER_AUTO; /* Session-Timer refresher     */
 	int dlg_min_se = -1;
+	int dlg_max_se = global_max_se;
 	struct {
 		char exten[AST_MAX_EXTENSION];
 		char context[AST_MAX_CONTEXT];
@@ -25325,19 +25326,17 @@
 				tmp_st_ref = st_get_refresher(p);
 			}
 
+			dlg_max_se = st_get_se(p, TRUE);
 			if (uac_max_se > 0) {
-				int dlg_max_se = st_get_se(p, TRUE);
 				if (dlg_max_se >= uac_min_se) {
 					st_interval = (uac_max_se < dlg_max_se) ? uac_max_se : dlg_max_se;
 				} else {
 					st_interval = uac_max_se;
 				}
 			} else if (uac_min_se > 0) {
-				int dlg_max_se = st_get_se(p, TRUE);
 				st_interval = MAX(dlg_max_se, uac_min_se);
 			} else {
-				/* Set to default max value */
-				st_interval = global_max_se;
+				st_interval = dlg_max_se;
 			}
 			break;
 




More information about the asterisk-commits mailing list