Record read size
authorMark Spencer <markster@digium.com>
Mon, 14 Mar 2005 01:05:34 +0000 (01:05 +0000)
committerMark Spencer <markster@digium.com>
Mon, 14 Mar 2005 01:05:34 +0000 (01:05 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5177 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_skinny.c

index a5f849d..3b4d526 100755 (executable)
@@ -2623,6 +2623,7 @@ static int get_input(struct skinnysession *s)
                dlen = *(int *)s->inbuf;
                if (dlen+8 > sizeof(s->inbuf))
                        dlen = sizeof(s->inbuf) - 8;
                dlen = *(int *)s->inbuf;
                if (dlen+8 > sizeof(s->inbuf))
                        dlen = sizeof(s->inbuf) - 8;
+               *(int *)s->inbuf = dlen;
                res = read(s->fd, s->inbuf+4, dlen+4);
                ast_mutex_unlock(&s->lock);
                if (res != (dlen+4)) {
                res = read(s->fd, s->inbuf+4, dlen+4);
                ast_mutex_unlock(&s->lock);
                if (res != (dlen+4)) {