telepathy-mission-control: McdAccount: Set "account-path-suffix" parameter on CMs that support it
Xavier Claessens
xclaesse at kemper.freedesktop.org
Mon Feb 17 13:09:29 PST 2014
Module: telepathy-mission-control
Branch: master
Commit: 0f68a60c8d6ef710b430cc72d61849e5f2f5860e
URL: http://cgit.freedesktop.org/telepathy/telepathy-mission-control/commit/?id=0f68a60c8d6ef710b430cc72d61849e5f2f5860e
Author: Xavier Claessens <xavier.claessens at collabora.co.uk>
Date: Fri Jan 24 16:33:28 2014 -0500
McdAccount: Set "account-path-suffix" parameter on CMs that support it
---
src/mcd-account.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/mcd-account.c b/src/mcd-account.c
index 0cfcdab..1b2544d 100644
--- a/src/mcd-account.c
+++ b/src/mcd-account.c
@@ -3614,6 +3614,9 @@ mcd_account_get_object_path (McdAccount *account)
/*
* Like _mcd_account_dup_parameters(), but return the parameters as they
* would be passed to RequestConnection for the given protocol.
+ *
+ * Returns: A GHashTable with g_strdup'ed keys and tp_g_value_slice_dup'ed
+ * values. Be careful: callers rely on that memory allocation model.
*/
static GHashTable *
mcd_account_coerce_parameters (McdAccount *account,
@@ -5024,6 +5027,13 @@ _mcd_account_connection_begin (McdAccount *account,
ctx->params = mcd_account_coerce_parameters (account, protocol);
g_assert (ctx->params != NULL);
+
+ /* Inject "account-path-suffix" parameter if supported by the protocol */
+ if (tp_protocol_has_param (protocol, "account-path-suffix"))
+ {
+ g_hash_table_insert (ctx->params, g_strdup ("account-path-suffix"),
+ tp_g_value_slice_new_string (account->priv->unique_name));
+ }
g_object_unref (protocol);
_mcd_account_set_connection_status (account,
More information about the telepathy-commits
mailing list