[Telepathy-commits] [telepathy-mission-control/master] Don't process aborted channels

Alberto Mardegan alberto.mardegan at nokia.com
Fri Jan 9 01:31:28 PST 2009


If a channel request has been cancelled, stop processing it.
---
 src/mcd-connection.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/mcd-connection.c b/src/mcd-connection.c
index 3d509eb..aefaa88 100644
--- a/src/mcd-connection.c
+++ b/src/mcd-connection.c
@@ -2209,6 +2209,13 @@ common_request_channel_cb (TpConnection *proxy, gboolean yours,
         return;
     }
 
+    /* if the channel request was cancelled, abort the channel now */
+    if (mcd_channel_get_status (channel) == MCD_CHANNEL_STATUS_FAILED)
+    {
+        g_debug ("Channel %p was cancelled, aborting", channel);
+        mcd_mission_abort (MCD_MISSION (channel));
+    }
+
     /* No dispatching here: the channel will be dispatched upon receiving the
      * NewChannels signal */
 }
-- 
1.5.6.5




More information about the Telepathy-commits mailing list