# HG changeset patch # User John Bailey # Date 1250908103 0 # Node ID 74958cad186d01054b9d2e7915507465fc0ddd2f # Parent abdca180a8970e66cec08036a9f6c5f4f854c3aa 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. diff -r abdca180a897 -r 74958cad186d libpurple/protocols/yahoo/libyahoo.c --- 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); diff -r abdca180a897 -r 74958cad186d libpurple/protocols/yahoo/libyahoojp.c --- 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); diff -r abdca180a897 -r 74958cad186d libpurple/protocols/yahoo/libymsg.c --- 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);