summaryrefslogtreecommitdiff
path: root/zaptel.c
diff options
context:
space:
mode:
authormarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2003-08-15 22:29:17 +0000
committermarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2003-08-15 22:29:17 +0000
commitcef4a4f4ed8e891e41dc1c9087611ff1989ab39f (patch)
treeb7053ae1aa56ffdd8ed5f1ddb0a32c79150dcd2f /zaptel.c
parent51f6b1e183d8d1e1ad6eea8c06d621293790c4ab (diff)
Really empty out buffers
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@233 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'zaptel.c')
-rwxr-xr-xzaptel.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/zaptel.c b/zaptel.c
index fa988a7..3fb9c6a 100755
--- a/zaptel.c
+++ b/zaptel.c
@@ -3076,11 +3076,11 @@ static int zt_chanandpseudo_ioctl(struct inode *inode, struct file *file, unsign
/* initialize read buffers and pointers */
chan->inreadbuf = 0;
chan->outreadbuf = -1;
-#if 0
- /* Do we need this? */
- chan->readn[0] = chan->readn[1] = 0;
- chan->readidx[0] = chan->readidx[1] = 0;
-#endif
+ for (j=0;j<chan->numbufs;j++) {
+ /* Do we need this? */
+ chan->readn[j] = 0;
+ chan->readidx[j] = 0;
+ }
wake_up_interruptible(&chan->readbufq); /* wake_up_interruptible waiting on read */
wake_up_interruptible(&chan->sel); /* wake_up_interruptible waiting on select */
}
@@ -3089,11 +3089,11 @@ static int zt_chanandpseudo_ioctl(struct inode *inode, struct file *file, unsign
/* initialize write buffers and pointers */
chan->outwritebuf = -1;
chan->inwritebuf = 0;
-#if 0
- /* Do we ned this? */
- chan->writen[0] = chan->writen[1] = 0;
- chan->writeidx[0] = chan->writeidx[1] = 0;
-#endif
+ for (j=0;j<chan->numbufs;j++) {
+ /* Do we need this? */
+ chan->writen[j] = 0;
+ chan->writeidx[j] = 0;
+ }
wake_up_interruptible(&chan->writebufq); /* wake_up_interruptible waiting on write */
wake_up_interruptible(&chan->sel); /* wake_up_interruptible waiting on select */
/* if IO MUX wait on write empty, well, this