[next] telepathy-mission-control: Rewrite the protocol name for local-xmpp accounts created by Telepathy1
Simon McVittie
smcv at kemper.freedesktop.org
Tue Apr 8 12:34:49 PDT 2014
Module: telepathy-mission-control
Branch: next
Commit: 19817f5ad3220d7c9dc584c10c405e5a39ef6273
URL: http://cgit.freedesktop.org/telepathy/telepathy-mission-control/commit/?id=19817f5ad3220d7c9dc584c10c405e5a39ef6273
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date: Thu Apr 3 17:02:08 2014 +0100
Rewrite the protocol name for local-xmpp accounts created by Telepathy1
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=77029
Reviewed-by: Xavier Claessens
---
src/mcd-account.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/mcd-account.c b/src/mcd-account.c
index 8652412..7cc779d 100644
--- a/src/mcd-account.c
+++ b/src/mcd-account.c
@@ -2976,6 +2976,18 @@ mcd_account_setup (McdAccount *account)
goto broken_account;
}
+ /* Be compatible with accounts loaded from Telepathy0 -
+ * silently translate local-xmpp into local_xmpp, etc. */
+ if (strchr (priv->protocol_name, '-') != NULL)
+ {
+ g_strdelimit (priv->protocol_name, "-", '_');
+
+ if (!mcd_storage_set_string (storage, name, MC_ACCOUNTS_KEY_PROTOCOL,
+ priv->protocol_name))
+ WARNING ("Unable to write modified protocol name '%s' back",
+ priv->protocol_name);
+ }
+
priv->object_path = g_strconcat (TP_ACCOUNT_OBJECT_PATH_BASE, name, NULL);
priv->enabled = mcd_storage_get_boolean (storage, name,
More information about the telepathy-commits
mailing list