[Telepathy-commits] [telepathy-gabble/master] gabble_media_channel_get_handle: return the same things GetAll would, rather than hard-coding (0, 0)

Simon McVittie simon.mcvittie at collabora.co.uk
Tue Mar 10 11:02:20 PDT 2009


---
 src/media-channel.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/media-channel.c b/src/media-channel.c
index 35bfba1..b80cd58 100644
--- a/src/media-channel.c
+++ b/src/media-channel.c
@@ -852,7 +852,13 @@ static void
 gabble_media_channel_get_handle (TpSvcChannel *iface,
                                  DBusGMethodInvocation *context)
 {
-  tp_svc_channel_return_from_get_handle (context, 0, 0);
+  GabbleMediaChannel *self = GABBLE_MEDIA_CHANNEL (iface);
+
+  if (self->priv->initial_peer == 0)
+    tp_svc_channel_return_from_get_handle (context, TP_HANDLE_TYPE_NONE, 0);
+  else
+    tp_svc_channel_return_from_get_handle (context, TP_HANDLE_TYPE_CONTACT,
+        self->priv->initial_peer);
 }
 
 
-- 
1.5.6.5




More information about the telepathy-commits mailing list