/pidgin/main: 5813479c8e02: Remove default XMPP file transfer pr...

Michael McConville <[email protected]>
Newsgroups gmane.comp.gnome.gaim.cvs
Message-ID <[email protected]>
Changeset: 5813479c8e02de1fe20a4ca48cbc2be0d1d0db58
Author:	 Michael McConville <[email protected]>
Date:	 2015-07-16 14:11 -0400
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/5813479c8e02

Description:

Remove default XMPP file transfer proxy and replace existing defaults in user prefs. See ticket #16535. (ok'd by elb, etan, datallah)

diffstat:

 libpurple/protocols/jabber/gtalk.c  |  5 +----
 libpurple/protocols/jabber/jabber.c |  8 +++++---
 libpurple/protocols/jabber/jabber.h |  1 -
 libpurple/protocols/jabber/xmpp.c   |  5 +----
 4 files changed, 7 insertions(+), 12 deletions(-)

diffs (59 lines):

diff --git a/libpurple/protocols/jabber/gtalk.c b/libpurple/protocols/jabber/gtalk.c
--- a/libpurple/protocols/jabber/gtalk.c
+++ b/libpurple/protocols/jabber/gtalk.c
@@ -89,10 +89,7 @@ gtalk_protocol_init(PurpleProtocol *prot
 						  option);
 
 	option = purple_account_option_string_new(_("File transfer proxies"),
-						  "ft_proxies",
-						/* TODO: Is this an acceptable default?
-						 * Also, keep this in sync as they add more servers */
-						  JABBER_DEFAULT_FT_PROXIES);
+						  "ft_proxies", NULL);
 	protocol->account_options = g_list_append(protocol->account_options,
 						  option);
 
diff --git a/libpurple/protocols/jabber/jabber.c b/libpurple/protocols/jabber/jabber.c
--- a/libpurple/protocols/jabber/jabber.c
+++ b/libpurple/protocols/jabber/jabber.c
@@ -1096,9 +1096,11 @@ jabber_login(PurpleAccount *account)
 	if (js == NULL)
 		return;
 
-	/* TODO: Remove this at some point.  Added 2010-02-14 (v2.6.6) */
-	if (g_str_equal("proxy.jabber.org", purple_account_get_string(account, "ft_proxies", "")))
-		purple_account_set_string(account, "ft_proxies", JABBER_DEFAULT_FT_PROXIES);
+	/* replace old default proxies with the new default: NULL
+	 * TODO: these can eventually be removed */
+	if (g_str_equal("proxy.jabber.org", purple_account_get_string(account, "ft_proxies", ""))
+			|| g_str_equal("proxy.eu.jabber.org", purple_account_get_string(account, "ft_proxies", "")))
+		purple_account_set_string(account, "ft_proxies", NULL);
 
 	/*
 	 * Calculate the avatar hash for our current image so we know (when we
diff --git a/libpurple/protocols/jabber/jabber.h b/libpurple/protocols/jabber/jabber.h
--- a/libpurple/protocols/jabber/jabber.h
+++ b/libpurple/protocols/jabber/jabber.h
@@ -92,7 +92,6 @@ typedef struct _JabberStream JabberStrea
 #define JABBER_PROTOCOL_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj), JABBER_TYPE_PROTOCOL, JabberProtocolClass))
 
 #define JABBER_DEFAULT_REQUIRE_TLS    "require_starttls"
-#define JABBER_DEFAULT_FT_PROXIES     "proxy.eu.jabber.org"
 
 /* Index into attention_types list */
 #define JABBER_BUZZ 0
diff --git a/libpurple/protocols/jabber/xmpp.c b/libpurple/protocols/jabber/xmpp.c
--- a/libpurple/protocols/jabber/xmpp.c
+++ b/libpurple/protocols/jabber/xmpp.c
@@ -80,10 +80,7 @@ xmpp_protocol_init(PurpleProtocol *proto
 						  option);
 
 	option = purple_account_option_string_new(_("File transfer proxies"),
-						  "ft_proxies",
-						/* TODO: Is this an acceptable default?
-						 * Also, keep this in sync as they add more servers */
-						  JABBER_DEFAULT_FT_PROXIES);
+						  "ft_proxies", NULL);
 	protocol->account_options = g_list_append(protocol->account_options,
 						  option);
 

_______________________________________________
Commits mailing list
[email protected]
https://pidgin.im/cgi-bin/mailman/listinfo/commits
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.