[Pkg-voip-commits] r8288 - in /asterisk/trunk/debian: changelog patches/fxs_ports_1626 patches/series

tzafrir at alioth.debian.org tzafrir at alioth.debian.org
Wed Apr 21 17:14:24 UTC 2010


Author: tzafrir
Date: Wed Apr 21 17:14:23 2010
New Revision: 8288

URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=8288
Log:
Patch fxs_ports_1626: fixes regression when building with openr2 support.

Added:
    asterisk/trunk/debian/patches/fxs_ports_1626
Modified:
    asterisk/trunk/debian/changelog
    asterisk/trunk/debian/patches/series

Modified: asterisk/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/changelog?rev=8288&op=diff
==============================================================================
--- asterisk/trunk/debian/changelog (original)
+++ asterisk/trunk/debian/changelog Wed Apr 21 17:14:23 2010
@@ -1,8 +1,9 @@
 asterisk (1:1.6.2.6-2) unstable; urgency=low
 
-  * Also depend on openr2. 
-
- -- Tzafrir Cohen <tzafrir at debian.org>  Mon, 12 Apr 2010 11:38:40 +0300
+  * Also depend on openr2.
+  * Patch fxs_ports_1626: fixes regression when building with openr2 support.
+
+ -- Tzafrir Cohen <tzafrir at debian.org>  Wed, 21 Apr 2010 20:12:34 +0300
 
 asterisk (1:1.6.2.6-1) unstable; urgency=low
 

Added: asterisk/trunk/debian/patches/fxs_ports_1626
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/patches/fxs_ports_1626?rev=8288&op=file
==============================================================================
--- asterisk/trunk/debian/patches/fxs_ports_1626 (added)
+++ asterisk/trunk/debian/patches/fxs_ports_1626 Wed Apr 21 17:14:23 2010
@@ -1,0 +1,88 @@
+From: Richard Mudgett <rmudgett at digium.com>
+Subject: CallerID channel DAHDI port FXS are empty after the first call.
+Bug: https://issues.asterisk.org/view.php?id=16968
+Applied-Upstream: 1.6.2, http://svnview.digium.com/svn/asterisk?revision=256368&view=revision
+
+The bug is exposed if MFC/R2 support is built into asterisk (i.e.,
+openr2.h is present in the include path).  Code that unconditionally
+clears the CallerID name and number is included.
+
+Also fixed a malformed if test in mkintf() added by issue 15883.
+Converted the if statement to a switch statement for clarity.
+
+Regression of the issue 15883 fix.
+
+(closes issue #16968)
+Reported by: grecco
+Patches:
+      issue16968.patch uploaded by rmudgett (license 664)
+
+(closes issue #16747)
+Reported by: viniciusfontes
+
+---
+ channels/chan_dahdi.c |   28 +++++++++++++++++++++-------
+ 1 files changed, 21 insertions(+), 7 deletions(-)
+
+diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
+index 49db2b0..d20fc07 100644
+--- a/channels/chan_dahdi.c
++++ b/channels/chan_dahdi.c
+@@ -4330,11 +4330,20 @@ static int dahdi_hangup(struct ast_channel *ast)
+ 
+ 	idx = dahdi_get_index(ast, p, 1);
+ 
+-	if ((p->sig == SIG_PRI) || (p->sig == SIG_SS7) || (p->sig == SIG_BRI) || (p->sig == SIG_BRI_PTMP)) {
++	switch (p->sig) {
++	case SIG_PRI:
++	case SIG_BRI:
++	case SIG_BRI_PTMP:
++	case SIG_SS7:
+ 		x = 1;
+ 		ast_channel_setoption(ast,AST_OPTION_AUDIO_MODE,&x,sizeof(char),0);
++		/* Fall through */
++	case SIG_MFCR2:
+ 		p->cid_num[0] = '\0';
+ 		p->cid_name[0] = '\0';
++		break;
++	default:
++		break;
+ 	}
+ 
+ 	x = 0;
+@@ -4529,8 +4538,6 @@ static int dahdi_hangup(struct ast_channel *ast)
+ 		}
+ #endif
+ #ifdef HAVE_OPENR2
+-		p->cid_num[0] = '\0';
+-		p->cid_name[0] = '\0';
+ 		if (p->mfcr2 && p->mfcr2call && openr2_chan_get_direction(p->r2chan) != OR2_DIR_STOPPED) {
+ 			ast_log(LOG_DEBUG, "disconnecting MFC/R2 call on chan %d\n", p->channel);
+ 			/* If it's an incoming call, check the mfcr2_forced_release setting */
+@@ -10503,12 +10510,19 @@ static struct dahdi_pvt *mkintf(int channel, const struct dahdi_chan_conf *conf,
+ 		ast_copy_string(tmp->context, conf->chan.context, sizeof(tmp->context));
+ 		ast_copy_string(tmp->parkinglot, conf->chan.parkinglot, sizeof(tmp->parkinglot));
+ 		tmp->cid_ton = 0;
+-		if ((tmp->sig != SIG_PRI) || (tmp->sig != SIG_SS7) || (tmp->sig != SIG_BRI) || (tmp->sig != SIG_BRI_PTMP) || (tmp->sig != SIG_MFCR2)) {
+-			ast_copy_string(tmp->cid_num, conf->chan.cid_num, sizeof(tmp->cid_num));
+-			ast_copy_string(tmp->cid_name, conf->chan.cid_name, sizeof(tmp->cid_name));
+-		} else {
++		switch (tmp->sig) {
++		case SIG_PRI:
++		case SIG_BRI:
++		case SIG_BRI_PTMP:
++		case SIG_SS7:
++		case SIG_MFCR2:
+ 			tmp->cid_num[0] = '\0';
+ 			tmp->cid_name[0] = '\0';
++			break;
++		default:
++			ast_copy_string(tmp->cid_num, conf->chan.cid_num, sizeof(tmp->cid_num));
++			ast_copy_string(tmp->cid_name, conf->chan.cid_name, sizeof(tmp->cid_name));
++			break;
+ 		}
+ 		ast_copy_string(tmp->mailbox, conf->chan.mailbox, sizeof(tmp->mailbox));
+ 		if (channel != CHAN_PSEUDO && !ast_strlen_zero(tmp->mailbox)) {
+-- 
+1.5.5.6
+

Modified: asterisk/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/patches/series?rev=8288&op=diff
==============================================================================
--- asterisk/trunk/debian/patches/series (original)
+++ asterisk/trunk/debian/patches/series Wed Apr 21 17:14:23 2010
@@ -22,3 +22,4 @@
 followme_prompts
 sqlite3_func_rename
 h323-extra-target
+fxs_ports_1626




More information about the Pkg-voip-commits mailing list