[telepathy-mission-control/master] fd.o#24637: dispatch_operation_handle_with, dispatch_operation_claim: don't immediately emit Finished

Simon McVittie simon.mcvittie at collabora.co.uk
Tue Oct 27 15:20:48 PDT 2009


We'll emit Finished at the appropriate time later, instead.

This behaviour change breaks a too-specific check in
dispatcher/handle-channels-fails.py.
---
 src/mcd-dispatch-operation.c                     |    2 --
 test/twisted/dispatcher/handle-channels-fails.py |   16 +++++++++-------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/mcd-dispatch-operation.c b/src/mcd-dispatch-operation.c
index 6ef0411..65464cc 100644
--- a/src/mcd-dispatch-operation.c
+++ b/src/mcd-dispatch-operation.c
@@ -610,7 +610,6 @@ dispatch_operation_handle_with (TpSvcChannelDispatchOperation *cdo,
     g_queue_push_tail (self->priv->approvals,
                        approval_new (APPROVAL_TYPE_HANDLE_WITH));
     _mcd_dispatch_operation_check_client_locks (self);
-    _mcd_dispatch_operation_finish (self);
     tp_svc_channel_dispatch_operation_return_from_handle_with (context);
 }
 
@@ -642,7 +641,6 @@ dispatch_operation_claim (TpSvcChannelDispatchOperation *cdo,
     g_queue_push_tail (priv->approvals,
                        approval_new (APPROVAL_TYPE_CLAIM));
     _mcd_dispatch_operation_check_client_locks (self);
-    _mcd_dispatch_operation_finish (self);
 }
 
 static void
diff --git a/test/twisted/dispatcher/handle-channels-fails.py b/test/twisted/dispatcher/handle-channels-fails.py
index 84e6f8c..5051211 100644
--- a/test/twisted/dispatcher/handle-channels-fails.py
+++ b/test/twisted/dispatcher/handle-channels-fails.py
@@ -148,7 +148,7 @@ def test(q, bus, mc):
             cs.tp_name_prefix + '.Client.Empathy')
 
     # Empathy is asked to handle the channels
-    e, _, _, _ = q.expect_many(
+    e, _ = q.expect_many(
             EventPattern('dbus-method-call',
                 path=empathy.object_path,
                 interface=cs.HANDLER, method='HandleChannels',
@@ -156,9 +156,6 @@ def test(q, bus, mc):
             # FIXME: currently HandleWith succeeds immediately, rather than
             # failing when HandleChannels fails (fd.o #21003)
             EventPattern('dbus-return', method='HandleWith'),
-            EventPattern('dbus-signal', interface=cs.CDO, signal='Finished'),
-            EventPattern('dbus-signal', interface=cs.CD_IFACE_OP_LIST,
-                signal='DispatchOperationFinished'),
             )
 
     # Empathy rejects the channels
@@ -177,9 +174,14 @@ def test(q, bus, mc):
     q.dbus_raise(k.message, cs.NOT_AVAILABLE, 'Also blind drunk',
             bus=kopete_bus)
 
-    # MC gives up and closes the channel
-    q.expect('dbus-method-call', path=chan.object_path,
-            interface=cs.CHANNEL, method='Close', args=[])
+    # MC gives up and closes the channel. This is the end of the CDO.
+    q.expect_many(
+            EventPattern('dbus-method-call', path=chan.object_path,
+                interface=cs.CHANNEL, method='Close', args=[]),
+            EventPattern('dbus-signal', interface=cs.CDO, signal='Finished'),
+            EventPattern('dbus-signal', interface=cs.CD_IFACE_OP_LIST,
+                signal='DispatchOperationFinished'),
+            )
 
     # Now there are no more active channel dispatch operations
     assert cd_props.Get(cs.CD_IFACE_OP_LIST, 'DispatchOperations') == []
-- 
1.5.6.5




More information about the telepathy-commits mailing list