[svn-commits] irroot: branch irroot/distrotech-customers-1.8 r320939 - in /team/irroot/dist...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu May 26 00:49:37 CDT 2011


Author: irroot
Date: Thu May 26 00:49:25 2011
New Revision: 320939

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=320939
Log:

Backport changes from trunk
 * Nativeformat fixup chan_local
 * CHANGES
 * Comment in res_fax_spandsp


Modified:
    team/irroot/distrotech-customers-1.8/CHANGES
    team/irroot/distrotech-customers-1.8/channels/chan_local.c
    team/irroot/distrotech-customers-1.8/res/res_fax_spandsp.c

Modified: team/irroot/distrotech-customers-1.8/CHANGES
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-1.8/CHANGES?view=diff&rev=320939&r1=320938&r2=320939
==============================================================================
--- team/irroot/distrotech-customers-1.8/CHANGES (original)
+++ team/irroot/distrotech-customers-1.8/CHANGES Thu May 26 00:49:25 2011
@@ -80,6 +80,7 @@
  * Add T38 support for REJECTED state where T.38 Negotiation is explicitly rejected.
  * Enable Optional SRTP by setting encryption=try
  * Add option encryption_taglen to set auth taglen only 32 and 80 are supported currently.
+
 
 IAX2 Changes
 -----------

Modified: team/irroot/distrotech-customers-1.8/channels/chan_local.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-1.8/channels/chan_local.c?view=diff&rev=320939&r1=320938&r2=320939
==============================================================================
--- team/irroot/distrotech-customers-1.8/channels/chan_local.c (original)
+++ team/irroot/distrotech-customers-1.8/channels/chan_local.c Thu May 26 00:49:25 2011
@@ -532,19 +532,25 @@
 	}
 	ao2_ref(p, 1); /* ref for local_queue_frame */
 
-	/* fixup formats nativeformat has changed we must adjust */
-	if ((bridge = ast_bridged_channel(p->owner)) && (!(bridge->nativeformats &  p->owner->nativeformats))) {
-		p->chan->nativeformats = bridge->nativeformats;
-		p->owner->nativeformats = bridge->nativeformats;
-		ast_set_read_format(p->owner, p->owner->readformat);
-		ast_set_write_format(p->owner, p->owner->writeformat);
-		ast_set_read_format(p->chan, p->chan->readformat);
-		ast_set_write_format(p->chan, p->chan->writeformat);
-	}
-
 	isoutbound = IS_OUTBOUND(ast, p);
-	if (isoutbound && f && (f->frametype == AST_FRAME_VOICE || f->frametype == AST_FRAME_VIDEO))
+	if (isoutbound && f && (f->frametype == AST_FRAME_VOICE || f->frametype == AST_FRAME_VIDEO)) {
 		check_bridge(p);
+	} else if (!isoutbound) {
+		/* fixup formats nativeformat has changed we must adjust
+		 * ast is p->owner and is locked here*/
+		bridge = ast_bridged_channel(ast);
+		if (!(bridge->nativeformats & ast->nativeformats)) {
+			ast->nativeformats = bridge->nativeformats;
+			ast_set_read_format(ast, ast->readformat);
+			ast_set_write_format(ast, ast->writeformat);
+			ast_channel_lock(p->chan);
+			p->chan->nativeformats = bridge->nativeformats;
+			ast_set_read_format(p->chan, p->chan->readformat);
+			ast_set_write_format(p->chan, p->chan->writeformat);
+			ast_channel_unlock(p->chan);
+		}
+	}
+
 	if (!ast_test_flag(p, LOCAL_ALREADY_MASQED))
 		res = local_queue_frame(p, isoutbound, f, ast, 1);
 	else {

Modified: team/irroot/distrotech-customers-1.8/res/res_fax_spandsp.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-1.8/res/res_fax_spandsp.c?view=diff&rev=320939&r1=320938&r2=320939
==============================================================================
--- team/irroot/distrotech-customers-1.8/res/res_fax_spandsp.c (original)
+++ team/irroot/distrotech-customers-1.8/res/res_fax_spandsp.c Thu May 26 00:49:25 2011
@@ -717,6 +717,7 @@
 {
 	struct spandsp_pvt *p = s->tech_pvt;
 
+	/*invalid frame*/
 	if (!f->data.ptr || !f->samples) {
 		return 0;
 	}




More information about the svn-commits mailing list