summaryrefslogtreecommitdiff
path: root/zaptel.c
diff options
context:
space:
mode:
authorjim <jim@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2004-10-25 22:46:19 +0000
committerjim <jim@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2004-10-25 22:46:19 +0000
commitc06907573aadc3196d3c2f2d3b11da269f04ff1d (patch)
tree742ad247ecddfbc2ad2edd1e6b7f46b174618ec8 /zaptel.c
parentd13ea57a1d7515cf8e91dbee528f3d7ba4022469 (diff)
Fix CONF_MONITOR modes in zaptel.c so that it works properly between 2 pseudo-channels.
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@482 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'zaptel.c')
-rwxr-xr-xzaptel.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/zaptel.c b/zaptel.c
index a1f2f8d..4f88f6f 100755
--- a/zaptel.c
+++ b/zaptel.c
@@ -4583,6 +4583,8 @@ static inline void __zt_process_getaudio_chunk(struct zt_chan *ss, unsigned char
/* Do nuffin */
break;
case ZT_CONF_MONITOR: /* Monitor a channel's rx mode */
+ /* if a pseudo-channel, ignore */
+ if (ms->flags & ZT_FLAG_PSEUDO) break;
/* Add monitored channel */
if (chans[ms->confna]->flags & ZT_FLAG_PSEUDO) {
ACSS(getlin, chans[ms->confna]->getlin);
@@ -4593,6 +4595,8 @@ static inline void __zt_process_getaudio_chunk(struct zt_chan *ss, unsigned char
txb[x] = ZT_LIN2X(getlin[x], ms);
break;
case ZT_CONF_MONITORTX: /* Monitor a channel's tx mode */
+ /* if a pseudo-channel, ignore */
+ if (ms->flags & ZT_FLAG_PSEUDO) break;
/* Add monitored channel */
if (chans[ms->confna]->flags & ZT_FLAG_PSEUDO) {
ACSS(getlin, chans[ms->confna]->putlin);
@@ -4604,6 +4608,8 @@ static inline void __zt_process_getaudio_chunk(struct zt_chan *ss, unsigned char
txb[x] = ZT_LIN2X(getlin[x], ms);
break;
case ZT_CONF_MONITORBOTH: /* monitor a channel's rx and tx mode */
+ /* if a pseudo-channel, ignore */
+ if (ms->flags & ZT_FLAG_PSEUDO) break;
ACSS(getlin, chans[ms->confna]->putlin);
ACSS(getlin, chans[ms->confna]->getlin);
for (x=0;x<ZT_CHUNKSIZE;x++)