summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.co.uk>2014-01-24 16:33:28 -0500
committerXavier Claessens <xavier.claessens@collabora.co.uk>2014-02-17 16:09:19 -0500
commit0f68a60c8d6ef710b430cc72d61849e5f2f5860e (patch)
treebaa866a077ea2e53ea3fd95da100ac7ab46447a0
parent6964c54760f54ccad52f17ed739ea40c3665c96a (diff)
McdAccount: Set "account-path-suffix" parameter on CMs that support it
-rw-r--r--src/mcd-account.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mcd-account.c b/src/mcd-account.c
index 0cfcdabe..1b2544df 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,