]> git.0d.be Git - empathy.git/commitdiff
Special-case XMPP with importing accounts from Pidgin. (Fixes bug #579992)
authorJonny Lamb <jonny.lamb@collabora.co.uk>
Fri, 5 Jun 2009 13:59:15 +0000 (14:59 +0100)
committerJonny Lamb <jonny.lamb@collabora.co.uk>
Fri, 5 Jun 2009 13:59:15 +0000 (14:59 +0100)
It was decided that if pidgin has an account with no host set, then
both the server and port should be ignored, as a special case in XMPP.

Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
src/empathy-import-pidgin.c

index a58111d5920e771ee23048bd9abfa310e70c367a..fad9d83da3f547e73741e8ad4e0afcd79c01c678 100644 (file)
@@ -288,7 +288,24 @@ empathy_import_pidgin_load (void)
       /* If we have the needed settings, add the account data to the list,
        * otherwise free the data */
       if (data->profile != NULL && g_hash_table_size (data->settings) > 0)
-        accounts = g_list_prepend (accounts, data);
+        {
+          /* Special-case XMPP:
+           * http://bugzilla.gnome.org/show_bug.cgi?id=579992 */
+          if (!tp_strdiff (
+                  mc_profile_get_protocol_name (data->profile), "jabber"))
+            {
+              GValue *server;
+              server = g_hash_table_lookup (data->settings, "server");
+
+              if (!server || EMP_STR_EMPTY (g_value_get_string (server)))
+                {
+                  g_hash_table_remove (data->settings, "port");
+                  g_hash_table_remove (data->settings, "server");
+                }
+            }
+
+          accounts = g_list_prepend (accounts, data);
+        }
       else
         empathy_import_account_data_free (data);
     }