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@digium.com>
Acked-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9493 a0bf4364-ded3-4de4-8d8a-66a801d63aff
This commit is contained in:
Russ Meyerriecks 2010-11-19 17:34:36 +00:00
parent 712704c237
commit 494472ee1a
2 changed files with 11 additions and 3 deletions

View File

@ -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);
}

View File

@ -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