src/ft.c

changeset 9798
9da203982089
parent 9796
dd7499147bed
child 9805
440c01e927ae
--- a/src/ft.c	Fri Aug 20 22:05:18 2004 +0000
+++ b/src/ft.c	Sat Aug 21 02:02:25 2004 +0000
@@ -666,7 +666,7 @@
 	GaimXferUiOps *ui_ops;
 	GaimXfer *xfer = (GaimXfer *)data;
 	char *buffer = NULL;
-	ssize_t r;
+	ssize_t r = 0;
 
 	if (condition & GAIM_INPUT_READ) {
 		r = gaim_xfer_read(xfer, &buffer);
@@ -677,13 +677,14 @@
 			return;
 		}
 	}
-	else {
+
+	if (condition & GAIM_INPUT_WRITE) {
 		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) {
+			if (xfer->watcher) {
 				gaim_input_remove(xfer->watcher);
 				xfer->watcher = 0;
 			}

mercurial