Mercurial > pidgin
changeset 28044:74958cad186d
Add a boolean account option (defaulting to off) to control whether to use
an account-specific proxy for Yahoo SSL connections. Fixes #9488, I hope.
author | John Bailey <rekkanoryo@rekkanoryo.org> |
---|---|
date | Sat, 22 Aug 2009 02:28:23 +0000 |
parents | abdca180a897 |
children | 98d8c11e4937 e0c20f0e04bc |
files | libpurple/protocols/yahoo/libyahoo.c libpurple/protocols/yahoo/libyahoojp.c libpurple/protocols/yahoo/libymsg.c |
diffstat | 3 files changed, 16 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/libyahoo.c Sat Aug 22 02:10:21 2009 +0000 +++ b/libpurple/protocols/yahoo/libyahoo.c Sat Aug 22 02:28:23 2009 +0000 @@ -321,13 +321,15 @@ option = purple_account_option_string_new(_("Chat room locale"), "room_list_locale", YAHOO_ROOMLIST_LOCALE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); + option = purple_account_option_string_new(_("Encoding"), "local_charset", "UTF-8"); + prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); + option = purple_account_option_bool_new(_("Ignore conference and chatroom invitations"), "ignore_invites", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); - option = purple_account_option_string_new(_("Encoding"), "local_charset", "UTF-8"); + option = purple_account_option_bool_new(_("Use account proxy for SSL connections"), "proxy_ssl", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); - #if 0 option = purple_account_option_string_new(_("Chat room list URL"), "room_list", YAHOO_ROOMLIST_URL); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option);
--- a/libpurple/protocols/yahoo/libyahoojp.c Sat Aug 22 02:10:21 2009 +0000 +++ b/libpurple/protocols/yahoo/libyahoojp.c Sat Aug 22 02:28:23 2009 +0000 @@ -217,13 +217,15 @@ option = purple_account_option_string_new(_("Chat room locale"), "room_list_locale", YAHOOJP_ROOMLIST_LOCALE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); + option = purple_account_option_string_new(_("Encoding"), "local_charset", "UTF-8"); + prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); + option = purple_account_option_bool_new(_("Ignore conference and chatroom invitations"), "ignore_invites", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); - option = purple_account_option_string_new(_("Encoding"), "local_charset", "UTF-8"); + option = purple_account_option_bool_new(_("Use account proxy for SSL connections"), "proxy_ssl", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); - #if 0 option = purple_account_option_string_new(_("Chat room list URL"), "room_list", YAHOO_ROOMLIST_URL); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option);
--- a/libpurple/protocols/yahoo/libymsg.c Sat Aug 22 02:10:21 2009 +0000 +++ b/libpurple/protocols/yahoo/libymsg.c Sat Aug 22 02:28:23 2009 +0000 @@ -1839,11 +1839,12 @@ PurpleAccount *account = purple_connection_get_account(gc); char *url = NULL; gboolean yahoojp = yahoo_is_japan(account); + gboolean proxy_ssl = purple_account_get_bool(account, "proxy_ssl", FALSE); url = g_strdup_printf(yahoojp ? YAHOOJP_LOGIN_URL : YAHOO_LOGIN_URL, token); - url_data = purple_util_fetch_url_request_len_with_account(account, url, - TRUE, YAHOO_CLIENT_USERAGENT, TRUE, NULL, FALSE, -1, - yahoo_auth16_stage2, auth_data); + url_data = purple_util_fetch_url_request_len_with_account( + proxy_ssl ? account : NULL, url, TRUE, YAHOO_CLIENT_USERAGENT, + TRUE, NULL, FALSE, -1, yahoo_auth16_stage2, auth_data); g_free(url); g_free(token); } @@ -1852,12 +1853,14 @@ static void yahoo_auth16_stage1(PurpleConnection *gc, const char *seed) { + PurpleAccount *account = purple_connection_get_account(gc); PurpleUtilFetchUrlData *url_data = NULL; struct yahoo_auth_data *auth_data = NULL; char *url = NULL; char *encoded_username; char *encoded_password; - gboolean yahoojp; + gboolean yahoojp = yahoo_is_japan(account); + gboolean proxy_ssl = purple_account_get_bool(account, "proxy_ssl", FALSE); purple_debug_info("yahoo", "Authentication: In yahoo_auth16_stage1\n"); @@ -1866,7 +1869,6 @@ return; } - yahoojp = yahoo_is_japan(purple_connection_get_account(gc)); auth_data = g_new0(struct yahoo_auth_data, 1); auth_data->gc = gc; auth_data->seed = g_strdup(seed); @@ -1879,7 +1881,7 @@ g_free(encoded_username); url_data = purple_util_fetch_url_request_len_with_account( - purple_connection_get_account(gc), url, TRUE, + proxy_ssl ? account : NULL, url, TRUE, YAHOO_CLIENT_USERAGENT, TRUE, NULL, FALSE, -1, yahoo_auth16_stage1_cb, auth_data);