[svn-commits] tzafrir: branch 1.2 r3229 - /branches/1.2/xpp/xpp_zap.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Nov 14 08:53:29 CST 2007


Author: tzafrir
Date: Wed Nov 14 08:53:28 2007
New Revision: 3229

URL: http://svn.digium.com/view/zaptel?view=rev&rev=3229
Log:
Fix a deadlock spotted on some SMP installations.

Modified:
    branches/1.2/xpp/xpp_zap.c

Modified: branches/1.2/xpp/xpp_zap.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/xpp_zap.c?view=diff&rev=3229&r1=3228&r2=3229
==============================================================================
--- branches/1.2/xpp/xpp_zap.c (original)
+++ branches/1.2/xpp/xpp_zap.c Wed Nov 14 08:53:28 2007
@@ -1364,7 +1364,7 @@
 	struct zt_chan	*chans = xpd->span.chans;
 	int		i;
 
-#if WITH_ECHO_SUPPRESSION
+#ifdef WITH_ECHO_SUPPRESSION
 	/* FIXME: need to Echo cancel double buffered data */
 	for (i = 0;i < xpd->span.channels; i++) {
 		if(unlikely(IS_SET(xpd->digital_signalling, i)))	/* Don't echo cancel PRI/BRI D-chans */
@@ -1419,12 +1419,12 @@
 			memset(chans[i].readchunk, 0x7F, ZT_CHUNKSIZE);	// SILENCE
 		}
 	}
-	do_ec(xpd);
 	spin_unlock_irqrestore(&xpd->lock, flags);
 	/*
 	 * This should be out of spinlocks, as it may call back our hook setting
 	 * methods
 	 */
+	do_ec(xpd);
 	zt_receive(&xpd->span);
 }
 
@@ -1775,7 +1775,7 @@
 
 	INFO("revision %s MAX_XPDS=%d (%d*%d)\n", XPP_VERSION,
 			MAX_XPDS, MAX_UNIT, MAX_SUBUNIT);
-#if	WITH_ECHO_SUPPRESSION
+#ifdef	WITH_ECHO_SUPPRESSION
 	INFO("FEATURE: with ECHO_SUPPRESSION\n");
 #else
 	INFO("FEATURE: without ECHO_SUPPRESSION\n");




More information about the svn-commits mailing list