changeset 17837:bce4211c4980

More robust hack to force Bonjour to use no proxy when directly connecting to buddy.
author Daniel Atallah <daniel.atallah@gmail.com>
date Mon, 11 Jun 2007 14:12:30 +0000
parents 18b62b0fc253
children 9ffaec13211b fa4b70c5ea9d
files libpurple/protocols/bonjour/jabber.c
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/bonjour/jabber.c	Mon Jun 11 08:45:54 2007 +0000
+++ b/libpurple/protocols/bonjour/jabber.c	Mon Jun 11 14:12:30 2007 +0000
@@ -736,15 +736,16 @@
 	if (bb->conversation == NULL)
 	{
 		PurpleProxyConnectData *connect_data;
+		PurpleProxyInfo *proxy_info;
 
 		/* Make sure that the account always has a proxy of "none".
 		 * This is kind of dirty, but proxy_connect_none() isn't exposed. */
-		static PurpleProxyInfo *tmp_none_proxy_info = NULL;
-		if (!tmp_none_proxy_info) {
-			tmp_none_proxy_info = purple_proxy_info_new();
-			purple_proxy_info_set_type(tmp_none_proxy_info, PURPLE_PROXY_NONE);
+		proxy_info = purple_account_get_proxy_info(data->account);
+		if (proxy_info == NULL) {
+			proxy_info = purple_proxy_info_new();
+			purple_account_set_proxy_info(data->account, proxy_info);
 		}
-		purple_account_set_proxy_info(data->account, tmp_none_proxy_info);
+		purple_proxy_info_set_type(proxy_info, PURPLE_PROXY_NONE);
 
 		connect_data =
 			purple_proxy_connect(data->account->gc, data->account, bb->ip,