Mercurial > pidgin
diff libgaim/account.c @ 14979:c157efddc62a
[gaim-migrate @ 17758]
Don't lose the account proxy settings just because they are hidden and not in use.
Also, make the MSN HTTP method use the same proxy setup code as the core - this should improve env. var proxy handling.
committer: Tailor Script <tailor@pidgin.im>
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Thu, 16 Nov 2006 04:58:40 +0000 |
parents | ad564b48dab0 |
children | 0a9c44ce9a4a |
line wrap: on
line diff
--- a/libgaim/account.c Thu Nov 16 03:17:27 2006 +0000 +++ b/libgaim/account.c Thu Nov 16 04:58:40 2006 +0000 @@ -269,34 +269,29 @@ proxy_type == GAIM_PROXY_SOCKS5 ? "socks5" : proxy_type == GAIM_PROXY_USE_ENVVAR ? "envvar" : "unknown"), -1); - if (proxy_type != GAIM_PROXY_USE_GLOBAL && - proxy_type != GAIM_PROXY_NONE && - proxy_type != GAIM_PROXY_USE_ENVVAR) + if ((value = gaim_proxy_info_get_host(proxy_info)) != NULL) + { + child = xmlnode_new_child(node, "host"); + xmlnode_insert_data(child, value, -1); + } + + if ((int_value = gaim_proxy_info_get_port(proxy_info)) != 0) { - if ((value = gaim_proxy_info_get_host(proxy_info)) != NULL) - { - child = xmlnode_new_child(node, "host"); - xmlnode_insert_data(child, value, -1); - } - - if ((int_value = gaim_proxy_info_get_port(proxy_info)) != 0) - { - snprintf(buf, sizeof(buf), "%d", int_value); - child = xmlnode_new_child(node, "port"); - xmlnode_insert_data(child, buf, -1); - } - - if ((value = gaim_proxy_info_get_username(proxy_info)) != NULL) - { - child = xmlnode_new_child(node, "username"); - xmlnode_insert_data(child, value, -1); - } - - if ((value = gaim_proxy_info_get_password(proxy_info)) != NULL) - { - child = xmlnode_new_child(node, "password"); - xmlnode_insert_data(child, value, -1); - } + snprintf(buf, sizeof(buf), "%d", int_value); + child = xmlnode_new_child(node, "port"); + xmlnode_insert_data(child, buf, -1); + } + + if ((value = gaim_proxy_info_get_username(proxy_info)) != NULL) + { + child = xmlnode_new_child(node, "username"); + xmlnode_insert_data(child, value, -1); + } + + if ((value = gaim_proxy_info_get_password(proxy_info)) != NULL) + { + child = xmlnode_new_child(node, "password"); + xmlnode_insert_data(child, value, -1); } return node; @@ -657,7 +652,7 @@ g_free(data); } - /* If there are no values set then proxy_infourn NULL */ + /* If there are no values set then proxy_info NULL */ if ((gaim_proxy_info_get_type(proxy_info) == GAIM_PROXY_USE_GLOBAL) && (gaim_proxy_info_get_host(proxy_info) == NULL) && (gaim_proxy_info_get_port(proxy_info) == 0) && @@ -1031,7 +1026,7 @@ gc = gaim_account_get_connection(account); gaim_connection_destroy(gc); if (!gaim_account_get_remember_password(account)) - gaim_account_set_password(account, NULL); + gaim_account_set_password(account, NULL); gaim_account_set_connection(account, NULL); account->disconnecting = FALSE;