changeset 10576:6c6772d3ea31

[gaim-migrate @ 11970] Fix setting a buddy icon when using an HTTP proxy committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Sat, 05 Feb 2005 18:41:30 +0000
parents 96307e1a47c9
children af1eb57050cc
files src/protocols/yahoo/yahoo_filexfer.c src/protocols/yahoo/yahoo_picture.c
diffstat 2 files changed, 9 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/yahoo/yahoo_filexfer.c	Sat Feb 05 18:24:50 2005 +0000
+++ b/src/protocols/yahoo/yahoo_filexfer.c	Sat Feb 05 18:41:30 2005 +0000
@@ -88,6 +88,7 @@
 	struct yahoo_xfer_data *xd;
 	struct yahoo_packet *pkt;
 	gchar *size, *post, *buf;
+	const char *host;
 	int content_length, port;
 	GaimConnection *gc;
 	GaimAccount *account;
@@ -129,16 +130,14 @@
 
 	buf = g_strdup_printf("Y=%s; T=%s", yd->cookie_y, yd->cookie_t);
 
+	host = gaim_account_get_string(account, "xfer_host", YAHOO_XFER_HOST);
 	port = gaim_account_get_int(account, "xfer_port", YAHOO_XFER_PORT);
 	post = g_strdup_printf("POST http://%s:%d/notifyft HTTP/1.0\r\n"
 	                       "Content-length: %" G_GSIZE_FORMAT "\r\n"
 	                       "Host: %s:%d\r\n"
 	                       "Cookie: %s\r\n"
 	                       "\r\n",
-			       gaim_account_get_string(account, "xfer_host", YAHOO_XFER_HOST),
-			       port, content_length + 4 + gaim_xfer_get_size(xfer),
-			       gaim_account_get_string(account, "xfer_host", YAHOO_XFER_HOST),
-			       port, buf);
+			       host, port, content_length + 4 + gaim_xfer_get_size(xfer), host, port, buf);
 	write(xfer->fd, post, strlen(post));
 
 	yahoo_packet_send_special(pkt, xfer->fd, 8);
--- a/src/protocols/yahoo/yahoo_picture.c	Sat Feb 05 18:24:50 2005 +0000
+++ b/src/protocols/yahoo/yahoo_picture.c	Sat Feb 05 18:41:30 2005 +0000
@@ -364,7 +364,8 @@
 	struct yahoo_buddy_icon_upload_data *d = data;
 	struct yahoo_packet *pkt;
 	gchar *size, *post, *buf;
-	int content_length;
+	const char *host;
+	int content_length, port;
 	GaimConnection *gc;
 	GaimAccount *account;
 	struct yahoo_data *yd;
@@ -403,15 +404,14 @@
 
 	buf = g_strdup_printf("Y=%s; T=%s", yd->cookie_y, yd->cookie_t);
 
-	post = g_strdup_printf("POST /notifyft HTTP/1.0\r\n"
+	host = gaim_account_get_string(account, "xfer_host", YAHOO_XFER_HOST); 
+	port = gaim_account_get_int(account, "xfer_port", YAHOO_XFER_PORT);
+	post = g_strdup_printf("POST http://%s:%d/notifyft HTTP/1.0\r\n"
 	                       "Content-length: %" G_GSIZE_FORMAT "\r\n"
 	                       "Host: %s:%d\r\n"
 	                       "Cookie: %s\r\n"
 	                       "\r\n",
-	                       content_length + 4 + d->str->len,
-			       gaim_account_get_string(account, "xfer_host", YAHOO_XFER_HOST),
-			       gaim_account_get_int(account, "xfer_port", YAHOO_XFER_PORT),
-			       buf);
+	                       host, port, content_length + 4 + d->str->len, host, port, buf);
 	write(d->fd, post, strlen(post));
 
 	yahoo_packet_send_special(pkt, d->fd, 8);