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>
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)
{
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)
{