[Pkg-telepathy-commits] [telepathy-mission-control-6] 262/280: McdAccount: Set "account-path-suffix" parameter on CMs that support it

Simon McVittie smcv at debian.org
Thu Mar 27 20:07:31 UTC 2014


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian
in repository telepathy-mission-control-6.

commit 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,

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-telepathy/telepathy-mission-control-6.git



More information about the Pkg-telepathy-commits mailing list