# HG changeset patch # User Daniel Atallah # Date 1196023885 0 # Node ID 844225b0c9059c0e916ecd937c39ee9ece382444 # Parent b12d8d11d46ce9b53e5be47c0ffffeb0f86a6fa2 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. diff -r b12d8d11d46c -r 844225b0c905 libpurple/protocols/jabber/libxmpp.c --- a/libpurple/protocols/jabber/libxmpp.c Sun Nov 25 14:16:54 2007 +0000 +++ b/libpurple/protocols/jabber/libxmpp.c Sun Nov 25 20:51:25 2007 +0000 @@ -219,33 +219,31 @@ option); option = purple_account_option_bool_new( - _("Allow plaintext auth over unencrypted streams"), - "auth_plain_in_clear", FALSE); + _("Allow plaintext auth over unencrypted streams"), + "auth_plain_in_clear", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, - option); - + option); + option = purple_account_option_int_new(_("Connect port"), "port", 5222); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, - option); - + option); + option = purple_account_option_string_new(_("Connect server"), - "connect_server", NULL); + "connect_server", NULL); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, - option); - -#if 0 /* TODO: Enable this when we're string unfrozen */ + option); + option = purple_account_option_string_new(_("File transfer proxies"), "ft_proxies", /* TODO: Is this an acceptable default? */ "proxy.jabber.org:7777"); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); -#endif jabber_init_plugin(plugin); - + purple_prefs_remove("/plugins/prpl/jabber"); - + /* XXX - If any other plugin wants SASL this won't be good ... */ #ifdef HAVE_CYRUS_SASL #ifdef _WIN32 diff -r b12d8d11d46c -r 844225b0c905 libpurple/protocols/jabber/si.c --- 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");