[telepathy-mission-control/master] fd.o#24637: when EnsureChannels() is approval, don't emit Finished immediately

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


Also, in dispatcher/ensure-is-approval.py, assert that we emit Finished
later.
---
 src/mcd-dispatch-operation.c                  |    8 --------
 test/twisted/dispatcher/ensure-is-approval.py |   10 +++++-----
 2 files changed, 5 insertions(+), 13 deletions(-)

diff --git a/src/mcd-dispatch-operation.c b/src/mcd-dispatch-operation.c
index 65464cc..ca98c88 100644
--- a/src/mcd-dispatch-operation.c
+++ b/src/mcd-dispatch-operation.c
@@ -1254,14 +1254,6 @@ _mcd_dispatch_operation_approve (McdDispatchOperation *self,
     g_queue_push_tail (self->priv->approvals,
                        approval_new (APPROVAL_TYPE_REQUESTED));
 
-    if (self->priv->ado_pending > 0 || self->priv->accepted_by_an_approver)
-    {
-        /* the existing channel is waiting for approval; but since the
-         * same channel has been requested, the approval operation must
-         * terminate */
-        _mcd_dispatch_operation_finish (self);
-    }
-
     _mcd_dispatch_operation_check_client_locks (self);
 }
 
diff --git a/test/twisted/dispatcher/ensure-is-approval.py b/test/twisted/dispatcher/ensure-is-approval.py
index 131875a..a2fb085 100644
--- a/test/twisted/dispatcher/ensure-is-approval.py
+++ b/test/twisted/dispatcher/ensure-is-approval.py
@@ -245,11 +245,11 @@ def test(q, bus, mc):
 
     q.dbus_return(e.message, bus=kopete_bus, signature='')
 
-    # FIXME: this shouldn't happen until after HandleChannels has succeeded,
-    # but MC currently does this as soon as HandleWith is called (fd.o #21003)
-    #q.expect('dbus-signal', path=cdo_path, signal='Finished')
-    #q.expect('dbus-signal', path=cs.CD_PATH,
-    #    signal='DispatchOperationFinished', args=[cdo_path])
+    q.expect_many(
+            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