diff options
author | markster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2003-08-15 22:29:17 +0000 |
---|---|---|
committer | markster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2003-08-15 22:29:17 +0000 |
commit | cef4a4f4ed8e891e41dc1c9087611ff1989ab39f (patch) | |
tree | b7053ae1aa56ffdd8ed5f1ddb0a32c79150dcd2f | |
parent | 51f6b1e183d8d1e1ad6eea8c06d621293790c4ab (diff) |
Really empty out buffers
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@233 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rwxr-xr-x | zaptel.c | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -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 |