Mercurial > pidgin
diff libpurple/protocols/yahoo/yahoo_picture.c @ 23986:18a1f0fe5f40
Do a better job of detecting if the yahoo account is connecting through a HTTP
Proxy in order to generate acceptable HTTP requests.
Hopefully fixes #6527
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Wed, 27 Aug 2008 02:52:50 +0000 |
parents | 0044b8f3727a |
children | 5ec72dbdd28e |
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/yahoo_picture.c Wed Aug 27 02:43:25 2008 +0000 +++ b/libpurple/protocols/yahoo/yahoo_picture.c Wed Aug 27 02:52:50 2008 +0000 @@ -122,11 +122,8 @@ struct yahoo_fetch_picture_data *data; PurpleBuddy *b = purple_find_buddy(gc->account, who); const char *locksum = NULL; - gboolean use_whole_url = FALSE; - /* use whole URL if using HTTP Proxy */ - if ((gc->account->proxy_info) && (gc->account->proxy_info->type == PURPLE_PROXY_HTTP)) - use_whole_url = TRUE; + gboolean use_whole_url = yahoo_account_use_http_proxy(gc); /* FIXME: Cleanup this strtol() stuff if possible. */ if (b && (locksum = purple_buddy_icons_get_checksum_for_user(b)) != NULL && @@ -463,7 +460,8 @@ PurpleConnection *gc = d->gc; PurpleAccount *account; struct yahoo_data *yd; - gboolean use_whole_url = FALSE; + /* use whole URL if using HTTP Proxy */ + gboolean use_whole_url = yahoo_account_use_http_proxy(gc); account = purple_connection_get_account(gc); yd = gc->proto_data; @@ -476,10 +474,6 @@ yahoo_buddy_icon_upload_data_free(d); return; } - /* use whole URL if using HTTP Proxy */ - if ((gc->account->proxy_info) - && (gc->account->proxy_info->type == PURPLE_PROXY_HTTP)) - use_whole_url = TRUE; pkt = yahoo_packet_new(YAHOO_SERVICE_PICTURE_UPLOAD, YAHOO_STATUS_AVAILABLE, yd->session_id);