diff src/ft.c @ 8351:ffa642240fc1

[gaim-migrate @ 9075] marv is incredibly patient, waiting a long time for this to go in you should all be using Jabber for file transfer anyway, but if you're still stuck in the stone age, now you can transfer files via IRC committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Fri, 27 Feb 2004 01:45:26 +0000
parents cf84056fed27
children e4087b5c0627
line wrap: on
line diff
--- a/src/ft.c	Fri Feb 27 00:41:56 2004 +0000
+++ b/src/ft.c	Fri Feb 27 01:45:26 2004 +0000
@@ -512,6 +512,16 @@
 	else {
 		size_t s = MIN(gaim_xfer_get_bytes_remaining(xfer), 4096);
 
+		/* this is so the prpl can keep the connection open
+		   if it needs to for some odd reason. */
+		if (s == 0) {
+			if(xfer->watcher) {
+				gaim_input_remove(xfer->watcher);
+				xfer->watcher = 0;
+			}
+			return;
+		}
+
 		buffer = g_malloc0(s);
 
 		fread(buffer, 1, s, xfer->dest_fp);