aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.co.uk>2010-09-04 04:45:45 +0800
committerNicolas Dufresne <nicolas.dufresne@collabora.co.uk>2010-09-09 05:23:30 +0800
commit3e97317d56f9ae49a8424c679fc6e489483da8d1 (patch)
tree3d753480b3b1721901b417139444a249f963b32f
parent0d31be0718c4624eaa17778f60f953f261f7487d (diff)
downloadgsoc2013-empathy-3e97317d56f9ae49a8424c679fc6e489483da8d1.tar.gz
gsoc2013-empathy-3e97317d56f9ae49a8424c679fc6e489483da8d1.tar.zst
gsoc2013-empathy-3e97317d56f9ae49a8424c679fc6e489483da8d1.zip
Enable server fallback for GTalk account
Instead of hardcoding one server, let the connection manager try doing SRV resolution and if the resolution fails, let it try a list of fallback servers. Note that talkx.l.google.com is now used instead of talk.google.com. This is the DNS used in the Windows client, this DNS returns a list of IPs instead of 1. This also enable usage of HTTPS proxy when falling back to port 443 with old_ssl. Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
-rw-r--r--src/empathy-account-assistant.c14
-rw-r--r--src/empathy-accounts-dialog.c14
2 files changed, 20 insertions, 8 deletions
diff --git a/src/empathy-account-assistant.c b/src/empathy-account-assistant.c
index 4e615e82e..0f7bf4d25 100644
--- a/src/empathy-account-assistant.c
+++ b/src/empathy-account-assistant.c
@@ -416,12 +416,18 @@ account_assistant_protocol_changed_cb (GtkComboBox *chooser,
if (is_gtalk)
{
+ gchar *fallback_servers[] = {
+ "talkx.l.google.com",
+ "talkx.l.google.com:443,oldssl",
+ "talkx.l.google.com:80",
+ NULL};
+
empathy_account_settings_set_icon_name_async (settings, "im-google-talk",
NULL, NULL);
- /* We should not have to set the server but that may cause issue with
- * buggy router. */
- empathy_account_settings_set_string (settings, "server",
- "talk.google.com");
+
+ empathy_account_settings_set_string (settings, "server", NULL);
+ empathy_account_settings_set_strv (settings, "fallback-servers",
+ fallback_servers);
}
else if (is_facebook)
{
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index 2ad2fb759..98301a485 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -618,12 +618,18 @@ accounts_dialog_setup_ui_to_add_account (EmpathyAccountsDialog *dialog)
if (is_gtalk)
{
+ gchar *fallback_servers[] = {
+ "talkx.l.google.com",
+ "talkx.l.google.com:443,oldssl",
+ "talkx.l.google.com:80",
+ NULL};
+
empathy_account_settings_set_icon_name_async (settings, "im-google-talk",
NULL, NULL);
- /* We should not have to set the server but that may cause issue with
- * buggy router. */
- empathy_account_settings_set_string (settings, "server",
- "talk.google.com");
+
+ empathy_account_settings_set_string (settings, "server", NULL);
+ empathy_account_settings_set_strv (settings, "fallback-servers",
+ fallback_servers);
}
else if (is_facebook)
{