[svn-commits] rmeyerriecks: linux/trunk r9493 - in /linux/trunk: drivers/dahdi/ include/dahdi/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Nov 19 11:34:41 CST 2010


Author: rmeyerriecks
Date: Fri Nov 19 11:34:36 2010
New Revision: 9493

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9493
Log:
dahdi: Stops junk data from overwriting the dahdi_mirror pseudo chans

(issue #16831)
Reported by: tsearle
Patches:
      dahdi_mirror2.patch uploaded by tsearle (license 373)
Signed-off-by: Russ Meyerriecks <rmeyerriecks at digium.com>
Acked-by: Shaun Ruffell <sruffell at digium.com>

Modified:
    linux/trunk/drivers/dahdi/dahdi-base.c
    linux/trunk/include/dahdi/dahdi_config.h

Modified: linux/trunk/drivers/dahdi/dahdi-base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi-base.c?view=diff&rev=9493&r1=9492&r2=9493
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Fri Nov 19 11:34:36 2010
@@ -8528,8 +8528,16 @@
 	list_for_each_entry(pseudo, &pseudo_chans, node) {
 		unsigned char tmp[DAHDI_CHUNKSIZE];
 		spin_lock(&pseudo->chan.lock);
-		__dahdi_getempty(&pseudo->chan, tmp);
-		__dahdi_receive_chunk(&pseudo->chan, tmp);
+#ifdef CONFIG_DAHDI_MIRROR
+		// if this is a mirroring don't generate garbage
+		if(!pseudo->chan.srcmirror)
+		{
+#endif /* CONFIG_DAHDI_MIRROR */
+			__dahdi_getempty(&pseudo->chan, tmp);
+			__dahdi_receive_chunk(&pseudo->chan, tmp);
+#ifdef CONFIG_DAHDI_MIRROR
+		}
+#endif /* CONFIG_DAHDI_MIRROR */
 		spin_unlock(&pseudo->chan.lock);
 	}
 

Modified: linux/trunk/include/dahdi/dahdi_config.h
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/include/dahdi/dahdi_config.h?view=diff&rev=9493&r1=9492&r2=9493
==============================================================================
--- linux/trunk/include/dahdi/dahdi_config.h (original)
+++ linux/trunk/include/dahdi/dahdi_config.h Fri Nov 19 11:34:36 2010
@@ -187,6 +187,6 @@
 /*
  * Creates an interface for mirroring the raw channel data out to a pseudo-chan
  */
-/*#define CONFIG_DAHDI_MIRROR*/
+/* #define CONFIG_DAHDI_MIRROR */
 
 #endif




More information about the svn-commits mailing list