diff libpurple/protocols/jabber/si.c @ 21637:844225b0c905

Now that the release has been tagged and strings are unfrozen, enable the new ft proxy account setting for xmpp accounts. Also, prevent duplicate entries in the streamhost lists. I don't know if the default account proxy is acceptable, perhaps there shouldn't be a default value.
author Daniel Atallah <daniel.atallah@gmail.com>
date Sun, 25 Nov 2007 20:51:25 +0000
parents a4b6854737d5
children 7f2e38467781
line wrap: on
line diff
--- a/libpurple/protocols/jabber/si.c	Sun Nov 25 14:16:54 2007 +0000
+++ b/libpurple/protocols/jabber/si.c	Sun Nov 25 20:51:25 2007 +0000
@@ -780,6 +780,9 @@
 
 			g_snprintf(port, sizeof(port), "%hu", portnum);
 
+			if(g_list_find_custom(jsx->streamhosts, ft_proxy_list[i], jabber_si_compare_jid) != NULL)
+				continue;
+
 			streamhost = xmlnode_new_child(query, "streamhost");
 			xmlnode_set_attrib(streamhost, "jid", ft_proxy_list[i]);
 			xmlnode_set_attrib(streamhost, "host", ft_proxy_list[i]);
@@ -801,7 +804,10 @@
 
 		/* TODO: deal with zeroconf proxies */
 
-		if (!(sh->host && sh->port > 0))
+		if (!(sh->jid && sh->host && sh->port > 0))
+			continue;
+
+		if(g_list_find_custom(jsx->streamhosts, sh->jid, jabber_si_compare_jid) != NULL)
 			continue;
 
 		streamhost = xmlnode_new_child(query, "streamhost");