[telepathy-mission-control/master] McdDispatchOperation: make inc_observers_pending imply block_finished

Simon McVittie simon.mcvittie at collabora.co.uk
Tue Oct 20 08:47:20 PDT 2009


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

diff --git a/src/mcd-dispatch-operation.c b/src/mcd-dispatch-operation.c
index 12ae3f6..1d316de 100644
--- a/src/mcd-dispatch-operation.c
+++ b/src/mcd-dispatch-operation.c
@@ -133,6 +133,7 @@ _mcd_dispatch_operation_inc_observers_pending (McdDispatchOperation *self)
     g_return_if_fail (MCD_IS_DISPATCH_OPERATION (self));
 
     g_object_ref (self);
+    _mcd_dispatch_operation_block_finished (self);
 
     DEBUG ("%" G_GSIZE_FORMAT " -> %" G_GSIZE_FORMAT,
            self->priv->observers_pending,
@@ -150,6 +151,7 @@ _mcd_dispatch_operation_dec_observers_pending (McdDispatchOperation *self)
     g_return_if_fail (self->priv->observers_pending > 0);
     self->priv->observers_pending--;
 
+    _mcd_dispatch_operation_unblock_finished (self);
     g_object_unref (self);
 }
 
diff --git a/src/mcd-dispatcher.c b/src/mcd-dispatcher.c
index 729a3a8..cd863e7 100644
--- a/src/mcd-dispatcher.c
+++ b/src/mcd-dispatcher.c
@@ -928,7 +928,6 @@ observe_channels_cb (TpClient *proxy, const GError *error,
         DEBUG ("success from %s", tp_proxy_get_object_path (proxy));
 
     mcd_dispatcher_context_release_pending_observer (context);
-    _mcd_dispatch_operation_unblock_finished (context->operation);
 }
 
 /* The returned GPtrArray is allocated, but the contents are borrowed. */
@@ -1031,7 +1030,6 @@ mcd_dispatcher_run_observers (McdDispatcherContext *context)
                 _mcd_dispatch_operation_get_path (context->operation);
         }
 
-        _mcd_dispatch_operation_block_finished (context->operation);
         _mcd_dispatch_operation_inc_observers_pending (context->operation);
         mcd_dispatcher_context_ref (context, "CTXREF05");
 
-- 
1.5.6.5




More information about the telepathy-commits mailing list