[zaptel-commits] tzafrir: branch 1.2 r4473 - /branches/1.2/xpp/

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Mon Aug 11 08:47:45 CDT 2008


Author: tzafrir
Date: Mon Aug 11 08:47:45 2008
New Revision: 4473

URL: http://svn.digium.com/view/zaptel?view=rev&rev=4473
Log:
* pcmtx_chan debugging parameter now refers to a zaptel channel number.
* Do initialize xsp.  Closes issue #13276 .
* xbus_core_shutdown can't be __exit as it is used in initilization as
  well.

Modified:
    branches/1.2/xpp/Makefile
    branches/1.2/xpp/card_bri.c
    branches/1.2/xpp/card_pri.c
    branches/1.2/xpp/xbus-core.c
    branches/1.2/xpp/xbus-pcm.c

Modified: branches/1.2/xpp/Makefile
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/Makefile?view=diff&rev=4473&r1=4472&r2=4473
==============================================================================
--- branches/1.2/xpp/Makefile (original)
+++ branches/1.2/xpp/Makefile Mon Aug 11 08:47:45 2008
@@ -1,4 +1,4 @@
-# We only get here on kernels 2.6.0-2.6.8 .
+# We only get here on kernels 2.6.0-2.6.9 .
 # For newer kernels, Kbuild will be included directly by the kernel
 # build system.
 -include $(src)/Kbuild

Modified: branches/1.2/xpp/card_bri.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/card_bri.c?view=diff&rev=4473&r1=4472&r2=4473
==============================================================================
--- branches/1.2/xpp/card_bri.c (original)
+++ branches/1.2/xpp/card_bri.c Mon Aug 11 08:47:45 2008
@@ -1092,12 +1092,13 @@
 			if(IS_SET(wanted_lines, i)) {
 				if(SPAN_REGISTERED(tmp_xpd)) {
 #ifdef	DEBUG_PCMTX
-					if(pcmtx >= 0 && pcmtx_chan == i)
+					int	channo = tmp_xpd->span.chans[i].channo;
+
+					if(pcmtx >= 0 && pcmtx_chan == channo)
 						memset((u_char *)pcm, pcmtx, ZT_CHUNKSIZE);
 					else
 #endif
 						memcpy((u_char *)pcm, chans[i].writechunk, ZT_CHUNKSIZE);
-					// fill_beep((u_char *)pcm, tmp_xpd->addr.subunit, 2);
 				} else
 					memset((u_char *)pcm, 0x7F, ZT_CHUNKSIZE);
 				pcm += ZT_CHUNKSIZE;
@@ -1143,7 +1144,6 @@
 			if(IS_SET(tmp_mask, i)) {
 				r = tmp_xpd->span.chans[i].readchunk;
 				// memset((u_char *)r, 0x5A, ZT_CHUNKSIZE);	// DEBUG
-				// fill_beep((u_char *)r, 1, 1);	// DEBUG: BEEP
 				memcpy((u_char *)r, pcm, ZT_CHUNKSIZE);
 				pcm += ZT_CHUNKSIZE;
 			}

Modified: branches/1.2/xpp/card_pri.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/card_pri.c?view=diff&rev=4473&r1=4472&r2=4473
==============================================================================
--- branches/1.2/xpp/card_pri.c (original)
+++ branches/1.2/xpp/card_pri.c Mon Aug 11 08:47:45 2008
@@ -743,7 +743,7 @@
 	byte			fmr3 = 0;	/* write only for CRC4 */
 	byte			fmr4 = 0;
 	byte			imr0 = 0;
-	byte			xsp;
+	byte			xsp = 0;
 	unsigned int		bad_bits;
 	int			i;
 
@@ -1359,6 +1359,14 @@
 		if(IS_SET(lines, i)) {
 			physical_mask |= BIT(physical_chan);
 			if(SPAN_REGISTERED(xpd)) {
+#ifdef	DEBUG_PCMTX
+				int	channo = xpd->span.chans[i].channo;
+
+				if(pcmtx >= 0 && pcmtx_chan == channo)
+					memset((u_char *)pcm, pcmtx, ZT_CHUNKSIZE);
+				else
+#endif
+					memcpy((u_char *)pcm, chans[i].writechunk, ZT_CHUNKSIZE);
 				if(i == PRI_DCHAN_IDX(priv)) {
 					if(priv->dchan_tx_sample != chans[i].writechunk[0]) {
 						priv->dchan_tx_sample = chans[i].writechunk[0];
@@ -1368,12 +1376,6 @@
 					else
 						chans[i].writechunk[0] = 0xFF;	/* Clobber for next tick */
 				}
-#ifdef	DEBUG_PCMTX
-				if(pcmtx >= 0 && pcmtx_chan == i)
-					memset((u_char *)pcm, pcmtx, ZT_CHUNKSIZE);
-				else
-#endif
-					memcpy((u_char *)pcm, chans[i].writechunk, ZT_CHUNKSIZE);
 			} else
 				memset((u_char *)pcm, ZT_XLAW(0, (&chans[i])), ZT_CHUNKSIZE);
 			pcm += ZT_CHUNKSIZE;

Modified: branches/1.2/xpp/xbus-core.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/xbus-core.c?view=diff&rev=4473&r1=4472&r2=4473
==============================================================================
--- branches/1.2/xpp/xbus-core.c (original)
+++ branches/1.2/xpp/xbus-core.c Mon Aug 11 08:47:45 2008
@@ -1669,7 +1669,7 @@
 }
 
 
-void __exit xbus_core_shutdown(void)
+void xbus_core_shutdown(void)
 {
 	int		i;
 

Modified: branches/1.2/xpp/xbus-pcm.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/xbus-pcm.c?view=diff&rev=4473&r1=4472&r2=4473
==============================================================================
--- branches/1.2/xpp/xbus-pcm.c (original)
+++ branches/1.2/xpp/xbus-pcm.c Mon Aug 11 08:47:45 2008
@@ -846,7 +846,6 @@
 				else
 #endif
 					memcpy((u_char *)pcm, chans[i].writechunk, ZT_CHUNKSIZE);
-				// fill_beep((u_char *)pcm, xpd->addr.subunit, 2);
 			} else
 				memset((u_char *)pcm, 0x7F, ZT_CHUNKSIZE);
 			pcm += ZT_CHUNKSIZE;
@@ -881,7 +880,6 @@
 		if(got_data && !IS_SET(pcm_mute, i)) {
 			/* We have and want real data */
 			// memset((u_char *)r, 0x5A, ZT_CHUNKSIZE);	// DEBUG
-			// fill_beep((u_char *)r, 1, 1);	// DEBUG: BEEP
 			memcpy((u_char *)r, pcm, ZT_CHUNKSIZE);
 		} else if(IS_SET(xpd->wanted_pcm_mask | xpd->silence_pcm, i)) {
 			/* Inject SILENCE */




More information about the zaptel-commits mailing list