aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2009-06-05 21:59:15 +0800
committerJonny Lamb <jonny.lamb@collabora.co.uk>2009-06-05 21:59:15 +0800
commit9c1dfe2afbeae0a3e598e5afe094f42b321e5257 (patch)
tree11a8d7f7756601c882d7d806b6b09ea73407e1a2 /src
parent3d1f8a776ca187ee211cdd2361b0aab79def6834 (diff)
downloadgsoc2013-empathy-9c1dfe2afbeae0a3e598e5afe094f42b321e5257.tar
gsoc2013-empathy-9c1dfe2afbeae0a3e598e5afe094f42b321e5257.tar.gz
gsoc2013-empathy-9c1dfe2afbeae0a3e598e5afe094f42b321e5257.tar.bz2
gsoc2013-empathy-9c1dfe2afbeae0a3e598e5afe094f42b321e5257.tar.lz
gsoc2013-empathy-9c1dfe2afbeae0a3e598e5afe094f42b321e5257.tar.xz
gsoc2013-empathy-9c1dfe2afbeae0a3e598e5afe094f42b321e5257.tar.zst
gsoc2013-empathy-9c1dfe2afbeae0a3e598e5afe094f42b321e5257.zip
Special-case XMPP with importing accounts from Pidgin. (Fixes bug #579992)
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>
Diffstat (limited to 'src')
-rw-r--r--src/empathy-import-pidgin.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/empathy-import-pidgin.c b/src/empathy-import-pidgin.c
index a58111d59..fad9d83da 100644
--- a/src/empathy-import-pidgin.c
+++ b/src/empathy-import-pidgin.c
@@ -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);
}