changeset 7682:d9caaddaa56d

[gaim-migrate @ 8326] Tim Ringenbach (marv_sf) writes: " This fixes a crash on wingaim, and makes things more better. Simguy did most the work." committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Mon, 01 Dec 2003 17:16:40 +0000
parents 9ca2cdcc6f99
children 5e0c3c467db0
files src/protocols/yahoo/yahoo_filexfer.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/yahoo/yahoo_filexfer.c	Mon Dec 01 17:03:00 2003 +0000
+++ b/src/protocols/yahoo/yahoo_filexfer.c	Mon Dec 01 17:16:40 2003 +0000
@@ -250,7 +250,7 @@
 size_t yahoo_xfer_read(char **buffer, GaimXfer *xfer)
 {
 	gchar buf[1024];
-	size_t len;
+	ssize_t len;
 	gchar *start = NULL;
 	gchar *length;
 	gchar *end;
@@ -262,9 +262,9 @@
 
 	len = read(xfer->fd, buf, sizeof(buf));
 
-	if (len == 0) {
+	if (len <= 0) {
 		if (xd->length && (xd->length == xd->bytes_in))
-			gaim_xfer_end(xfer);
+			gaim_xfer_set_completed(xfer, TRUE);
 		else
 			gaim_xfer_cancel_remote(xfer);
 		return 0;