[telepathy-mission-control/master] mcd_dispatch_operation_actually_finish: set channels_handled if no channels remain

Simon McVittie simon.mcvittie at collabora.co.uk
Mon Nov 2 06:41:46 PST 2009


---
 src/mcd-dispatch-operation.c |    6 ++++++
 src/mcd-dispatcher.c         |    8 --------
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/src/mcd-dispatch-operation.c b/src/mcd-dispatch-operation.c
index f3a40d4..1784cbb 100644
--- a/src/mcd-dispatch-operation.c
+++ b/src/mcd-dispatch-operation.c
@@ -453,6 +453,12 @@ mcd_dispatch_operation_actually_finish (McdDispatchOperation *self)
     DEBUG ("%s/%p: finished", self->priv->unique_name, self);
     tp_svc_channel_dispatch_operation_emit_finished (self);
 
+    if (self->priv->channels == NULL)
+    {
+        DEBUG ("Nothing left to dispatch");
+        _mcd_dispatch_operation_set_channels_handled (self, TRUE);
+    }
+
     if (self->priv->claimer != NULL)
     {
         const GList *list;
diff --git a/src/mcd-dispatcher.c b/src/mcd-dispatcher.c
index f898ce4..7a21da2 100644
--- a/src/mcd-dispatcher.c
+++ b/src/mcd-dispatcher.c
@@ -1158,14 +1158,6 @@ mcd_dispatcher_op_ready_to_dispatch_cb (McdDispatchOperation *operation,
     g_assert (!_mcd_dispatch_operation_has_observers_pending
               (context->operation));
 
-    if (_mcd_dispatch_operation_peek_channels (context->operation) == NULL)
-    {
-        DEBUG ("Nothing left to dispatch");
-
-        _mcd_dispatch_operation_set_channels_handled (context->operation,
-                                                      TRUE);
-    }
-
     if (_mcd_dispatch_operation_is_awaiting_approval (context->operation))
     {
         _mcd_dispatch_operation_set_awaiting_approval (context->operation,
-- 
1.5.6.5




More information about the telepathy-commits mailing list