Skinny: fix up handling of fragmented packets.
authorDamien Wedhorn <voip@facts.com.au>
Mon, 20 Jan 2014 23:25:38 +0000 (23:25 +0000)
committerDamien Wedhorn <voip@facts.com.au>
Mon, 20 Jan 2014 23:25:38 +0000 (23:25 +0000)
Bad offset in reading second or more fragment of skinny packets. Fixed
to offset by char (single byte) rather than size of req.
........

Merged revisions 405982 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405985 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_skinny.c

index d8c3d61..fee2ee0 100644 (file)
@@ -7595,7 +7595,7 @@ static void *skinny_session(void *data)
 
                        bytesread = 0;
                        while (1) {
-                               if ((res = read(s->fd, &req->data+bytesread, dlen-bytesread)) < 0) {
+                               if ((res = read(s->fd, ((char*)&req->data)+bytesread, dlen-bytesread)) < 0) {
                                        ast_log(LOG_WARNING, "Data read() returned error: %s\n", strerror(errno));
                                        break;
                                }