Mercurial > pidgin
changeset 1234:cedf7047081e
[gaim-migrate @ 1244]
this should fix a few problems.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Mon, 11 Dec 2000 13:06:03 +0000 |
parents | 728a90516211 |
children | a9cf2f61a7b1 |
files | src/toc.c |
diffstat | 1 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/toc.c Mon Dec 11 12:50:38 2000 +0000 +++ b/src/toc.c Mon Dec 11 13:06:03 2000 +0000 @@ -47,7 +47,7 @@ #include "pixmaps/dt_icon.xpm" #include "pixmaps/free_icon.xpm" -#define REVISION "gaim:$Revision: 1218 $" +#define REVISION "gaim:$Revision: 1244 $" #define TYPE_SIGNON 1 #define TYPE_DATA 2 @@ -221,8 +221,15 @@ } if (ntohs(hdr->len) > 0) { - ret = read(tdt->toc_fd, buffer + sizeof(struct sflap_hdr), ntohs(hdr->len)); - buffer[sizeof(struct sflap_hdr) + ret] = '\0'; + int count = 0; + ret = 0; + do { + count += ret; + ret = read(tdt->toc_fd, + buffer + sizeof(struct sflap_hdr) + count, + ntohs(hdr->len)); + } while (count + ret < ntohs(hdr->len) && ret > 0); + buffer[sizeof(struct sflap_hdr) + count + ret] = '\0'; return ret; } else return 0; }