[asterisk-commits] russell: branch russell/sla_reload r70730 - in /team/russell/sla_reload: ./ a...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jun 21 10:25:34 CDT 2007


Author: russell
Date: Thu Jun 21 10:25:33 2007
New Revision: 70730

URL: http://svn.digium.com/view/asterisk?view=rev&rev=70730
Log:
Merged revisions 70728-70729 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r70728 | russell | 2007-06-21 10:23:36 -0500 (Thu, 21 Jun 2007) | 10 lines

Merged revisions 70726 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r70726 | russell | 2007-06-21 10:21:16 -0500 (Thu, 21 Jun 2007) | 2 lines

Remove a couple of duplicate unlocks

........

................
r70729 | file | 2007-06-21 10:25:13 -0500 (Thu, 21 Jun 2007) | 10 lines

Merged revisions 70727 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r70727 | file | 2007-06-21 11:22:39 -0400 (Thu, 21 Jun 2007) | 2 lines

Do not Packet2Packet bridge if packetization settings do not allow it. (issue #9117 reported by phsultan)

........

................

Modified:
    team/russell/sla_reload/   (props changed)
    team/russell/sla_reload/apps/app_meetme.c
    team/russell/sla_reload/main/rtp.c

Propchange: team/russell/sla_reload/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/russell/sla_reload/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Jun 21 10:25:33 2007
@@ -1,1 +1,1 @@
-/trunk:1-70724
+/trunk:1-70729

Modified: team/russell/sla_reload/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/russell/sla_reload/apps/app_meetme.c?view=diff&rev=70730&r1=70729&r2=70730
==============================================================================
--- team/russell/sla_reload/apps/app_meetme.c (original)
+++ team/russell/sla_reload/apps/app_meetme.c Thu Jun 21 10:25:33 2007
@@ -4376,14 +4376,12 @@
 	AST_RWLIST_UNLOCK(&sla_trunks);
 	if (!trunk) {
 		ast_log(LOG_ERROR, "SLA Trunk '%s' not found!\n", trunk_name);
-		AST_RWLIST_UNLOCK(&sla_trunks);
 		pbx_builtin_setvar_helper(chan, "SLATRUNK_STATUS", "FAILURE");
 		return 0;
 	}
 	if (trunk->chan) {
 		ast_log(LOG_ERROR, "Call came in on %s, but the trunk is already in use!\n",
 			trunk_name);
-		AST_RWLIST_UNLOCK(&sla_trunks);
 		pbx_builtin_setvar_helper(chan, "SLATRUNK_STATUS", "FAILURE");
 		return 0;
 	}

Modified: team/russell/sla_reload/main/rtp.c
URL: http://svn.digium.com/view/asterisk/team/russell/sla_reload/main/rtp.c?view=diff&rev=70730&r1=70729&r2=70730
==============================================================================
--- team/russell/sla_reload/main/rtp.c (original)
+++ team/russell/sla_reload/main/rtp.c Thu Jun 21 10:25:33 2007
@@ -3489,6 +3489,8 @@
 
 	/* If either side can only do a partial bridge, then don't try for a true native bridge */
 	if (audio_p0_res == AST_RTP_TRY_PARTIAL || audio_p1_res == AST_RTP_TRY_PARTIAL) {
+		struct ast_format_list fmt0, fmt1;
+
 		/* In order to do Packet2Packet bridging both sides must be in the same rawread/rawwrite */
 		if (c0->rawreadformat != c1->rawwriteformat || c1->rawreadformat != c0->rawwriteformat) {
 			if (option_debug)
@@ -3497,6 +3499,17 @@
 			ast_channel_unlock(c1);
 			return AST_BRIDGE_FAILED_NOWARN;
 		}
+		/* They must also be using the same packetization */
+		fmt0 = ast_codec_pref_getsize(&p0->pref, c0->rawreadformat);
+		fmt1 = ast_codec_pref_getsize(&p1->pref, c1->rawreadformat);
+		if (fmt0.cur_ms != fmt1.cur_ms) {
+			if (option_debug)
+				ast_log(LOG_DEBUG, "Cannot packet2packet bridge - packetization settings prevent it\n");
+			ast_channel_unlock(c0);
+			ast_channel_unlock(c1);
+			return AST_BRIDGE_FAILED_NOWARN;
+		}
+
 		if (option_verbose > 2)
 			ast_verbose(VERBOSE_PREFIX_3 "Packet2Packet bridging %s and %s\n", c0->name, c1->name);
 		res = bridge_p2p_loop(c0, c1, p0, p1, timeoutms, flags, fo, rc, pvt0, pvt1);




More information about the asterisk-commits mailing list