diff options
-rw-r--r-- | drivers/dahdi/dahdi-base.c | 12 | ||||
-rw-r--r-- | include/dahdi/dahdi_config.h | 2 |
2 files changed, 11 insertions, 3 deletions
diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c index 2c0b4d7..368b049 100644 --- a/drivers/dahdi/dahdi-base.c +++ b/drivers/dahdi/dahdi-base.c @@ -8528,8 +8528,16 @@ static void process_masterspan(void) 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); } diff --git a/include/dahdi/dahdi_config.h b/include/dahdi/dahdi_config.h index 032a9d7..59896af 100644 --- a/include/dahdi/dahdi_config.h +++ b/include/dahdi/dahdi_config.h @@ -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 |