libpurple/protocols/yahoo/yahoo_filexfer.c

branch
release-2.2.1
changeset 20065
536822f0bc01
parent 20044
2b66cf7c7266
--- a/libpurple/protocols/yahoo/yahoo_filexfer.c	Fri Sep 28 15:19:52 2007 +0000
+++ b/libpurple/protocols/yahoo/yahoo_filexfer.c	Mon Oct 01 17:01:10 2007 +0000
@@ -281,9 +281,13 @@
 			}
 		}
 	} else {
-		xfer->fd = -1;
+		/* TODO: Using xfer->fd like this is probably a bad thing... */
 		if (purple_proxy_connect(NULL, account, xfer_data->host, xfer_data->port,
-		                              yahoo_receivefile_connected, xfer) == NULL) {
+		                              yahoo_receivefile_connected, xfer) == NULL)
+			xfer->fd = -1;
+		else
+			xfer->fd = 0;
+		if (xfer->fd == -1) {
 			purple_notify_error(gc, NULL, _("File Transfer Failed"),
 			             _("Unable to establish file descriptor."));
 			purple_xfer_cancel_remote(xfer);

mercurial