summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2005-08-15 20:03:54 +0000
committermarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2005-08-15 20:03:54 +0000
commitbed2e1a7eb26ef5d2e1570692508151de414390c (patch)
treebb32b963e6e446d880f212627f4a43ec73253687
parent1fb153c87c57cb4d09d9be7116ae88f98e29f496 (diff)
Don't mute anything with no (or empty) buffers
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@737 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rwxr-xr-xwct4xxp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/wct4xxp.c b/wct4xxp.c
index 0e36e42..d916d66 100755
--- a/wct4xxp.c
+++ b/wct4xxp.c
@@ -578,7 +578,7 @@ static void __t4_check_vpm(struct t4 *wc, unsigned int newio)
int y;
spin_lock_irqsave(&chan->lock, flags);
for (y=0;y<chan->numbufs;y++) {
- if (chan->readidx[y])
+ if ((chan->inreadbuf > -1) && (chan->readidx[y]))
memset(chan->readbuf[chan->inreadbuf], ZT_XLAW(0, chan), chan->readidx[y]);
}
spin_unlock_irqrestore(&chan->lock, flags);