telepathy-mission-control: McdChannel: use the TpConnection' s factory to make TpChannel objects

Simon McVittie smcv at kemper.freedesktop.org
Mon Oct 8 07:27:46 PDT 2012


Module: telepathy-mission-control
Branch: master
Commit: a41ad6c876407eeb47fa6ae4dc930d9fdae47c9e
URL:    http://cgit.freedesktop.org/telepathy/telepathy-mission-control/commit/?id=a41ad6c876407eeb47fa6ae4dc930d9fdae47c9e

Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Fri Sep 14 15:12:00 2012 +0100

McdChannel: use the TpConnection's factory to make TpChannel objects

Signed-off-by: Simon McVittie <simon.mcvittie at collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=55391
Reviewed-by: Xavier Claessens <xavier.claessens at collabora.co.uk>

---

 src/mcd-channel.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/mcd-channel.c b/src/mcd-channel.c
index 4310ba0..cba7b61 100644
--- a/src/mcd-channel.c
+++ b/src/mcd-channel.c
@@ -604,9 +604,10 @@ mcd_channel_new_from_properties (TpConnection *connection,
     TpChannel *tp_chan;
     GError *error = NULL;
 
+    tp_chan = tp_simple_client_factory_ensure_channel (
+        tp_proxy_get_factory (connection), connection, object_path,
+        properties, &error);
 
-    tp_chan = tp_channel_new_from_properties (connection, object_path,
-                                              properties, &error);
     if (G_UNLIKELY (error))
     {
         g_warning ("%s: got error: %s", G_STRFUNC, error->message);
@@ -689,8 +690,11 @@ _mcd_channel_create_proxy (McdChannel *channel, TpConnection *connection,
     GError *error = NULL;
 
     g_return_val_if_fail (MCD_IS_CHANNEL (channel), FALSE);
-    tp_chan = tp_channel_new_from_properties (connection, object_path,
-                                              properties, &error);
+
+    tp_chan = tp_simple_client_factory_ensure_channel (
+        tp_proxy_get_factory (connection), connection, object_path,
+        properties, &error);
+
     if (G_UNLIKELY (error))
     {
         g_warning ("%s: got error: %s", G_STRFUNC, error->message);



More information about the telepathy-commits mailing list