From b31c3e9ddacabb934b736b3ea3e9917babb1343f Mon Sep 17 00:00:00 2001 From: mattf Date: Wed, 11 Apr 2007 19:05:38 +0000 Subject: Merged revisions 2406 via svnmerge from https://origsvn.digium.com/svn/zaptel/branches/1.4 ................ r2406 | mattf | 2007-04-11 14:03:50 -0500 (Wed, 11 Apr 2007) | 12 lines Merged revisions 2405 via svnmerge from https://origsvn.digium.com/svn/zaptel/branches/1.2 ........ r2405 | mattf | 2007-04-11 14:01:21 -0500 (Wed, 11 Apr 2007) | 4 lines Fix buglet in memory corruption fix. ........ ................ git-svn-id: http://svn.digium.com/svn/zaptel/trunk@2407 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- zaptel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zaptel.c b/zaptel.c index c43db21..1ffded1 100644 --- a/zaptel.c +++ b/zaptel.c @@ -1811,7 +1811,7 @@ static ssize_t zt_chan_read(struct file *file, char *usrbuf, size_t count, int u chan->readidx[res] = 0; chan->readn[res] = 0; oldbuf = res; - res = (chan->outreadbuf + 1) % chan->numbufs; + chan->outreadbuf = (res + 1) % chan->numbufs; if (chan->outreadbuf == chan->inreadbuf) { /* Out of stuff */ chan->outreadbuf = -1; -- cgit v1.2.3