[Telepathy-commits] [telepathy-mission-control/master] Update outgoing flag when channel is ready

Alberto Mardegan alberto.mardegan at nokia.com
Mon Feb 2 00:00:18 PST 2009


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

diff --git a/src/mcd-channel.c b/src/mcd-channel.c
index 320a2ad..c2f583f 100644
--- a/src/mcd-channel.c
+++ b/src/mcd-channel.c
@@ -52,11 +52,10 @@ typedef struct _McdChannelRequestData McdChannelRequestData;
 
 struct _McdChannelPrivate
 {
-    gboolean outgoing;
-
     TpChannel *tp_chan;
 
     /* boolean properties */
+    guint outgoing : 1;
     guint has_group_if : 1;
     guint close_on_dispose : 1;
     guint members_accepted : 1;
@@ -206,6 +205,7 @@ on_channel_ready (TpChannel *tp_chan, const GError *error, gpointer user_data)
 {
     McdChannel *channel, **channel_ptr = user_data;
     McdChannelPrivate *priv;
+    gboolean requested, valid;
 
     channel = *channel_ptr;
     if (channel)
@@ -221,6 +221,12 @@ on_channel_ready (TpChannel *tp_chan, const GError *error, gpointer user_data)
     if (!channel) return;
 
     priv = channel->priv;
+    requested = tp_asv_get_boolean
+        (tp_channel_borrow_immutable_properties (tp_chan),
+         TP_IFACE_CHANNEL ".Requested", &valid);
+    if (valid)
+        priv->outgoing = requested;
+
     g_object_notify ((GObject *)channel, "name-ready");
 
     priv->has_group_if = tp_proxy_has_interface_by_id (priv->tp_chan,
-- 
1.5.6.5




More information about the Telepathy-commits mailing list