[Telepathy-commits] [telepathy-mission-control/master] Try to get the requested flag with the TpChannel

Alberto Mardegan alberto.mardegan at nokia.com
Wed Feb 18 00:26:38 PST 2009


Even if the channel is not yet ready, the "Requested" property might already be
there.
---
 src/mcd-channel.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/src/mcd-channel.c b/src/mcd-channel.c
index 13123ef..35cf5c0 100644
--- a/src/mcd-channel.c
+++ b/src/mcd-channel.c
@@ -278,6 +278,7 @@ static inline void
 _mcd_channel_setup (McdChannel *channel, McdChannelPrivate *priv)
 {
     McdChannel **channel_ptr;
+    GHashTable *properties;
 
     channel_ptr = g_slice_alloc (sizeof (McdChannel *));
     *channel_ptr = channel;
@@ -286,6 +287,16 @@ _mcd_channel_setup (McdChannel *channel, McdChannelPrivate *priv)
 
     g_signal_connect (priv->tp_chan, "invalidated",
 		      G_CALLBACK (proxy_destroyed), channel);
+
+    properties = tp_channel_borrow_immutable_properties (priv->tp_chan);
+    if (properties)
+    {
+        gboolean requested, valid = FALSE;
+        requested = tp_asv_get_boolean
+            (properties, TP_IFACE_CHANNEL ".Requested", &valid);
+        if (valid)
+            priv->outgoing = requested;
+    }
 }
 
 static void
-- 
1.5.6.5




More information about the telepathy-commits mailing list