[telepathy-mission-control/master] _mcd_dispatch_operation_try_next_handler: if called before approval, only run handlers that bypass approval
Simon McVittie
simon.mcvittie at collabora.co.uk
Mon Oct 19 16:04:56 PDT 2009
Currently, this can't happen, but it'll be changed soon so that it can.
---
src/mcd-dispatch-operation.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/mcd-dispatch-operation.c b/src/mcd-dispatch-operation.c
index 6f16cf1..396de7c 100644
--- a/src/mcd-dispatch-operation.c
+++ b/src/mcd-dispatch-operation.c
@@ -1725,6 +1725,7 @@ static gboolean
_mcd_dispatch_operation_try_next_handler (McdDispatchOperation *self)
{
gchar **iter;
+ gboolean is_approved = _mcd_dispatch_operation_is_approved (self);
/* If there is an approved handler chosen by the Approver, it's the only
* one we'll consider. */
@@ -1747,7 +1748,8 @@ _mcd_dispatch_operation_try_next_handler (McdDispatchOperation *self)
/* Maybe the handler has exited since we chose it, or maybe we
* already tried it? Otherwise, it's the right choice. */
- if (handler != NULL && !failed)
+ if (handler != NULL && !failed &&
+ (is_approved || _mcd_client_proxy_get_bypass_approval (handler)))
{
mcd_dispatch_operation_handle_channels (self, handler);
return TRUE;
@@ -1772,7 +1774,8 @@ _mcd_dispatch_operation_try_next_handler (McdDispatchOperation *self)
DEBUG ("Possible handler: %s (still exists: %c, already failed: %c)",
*iter, handler != NULL ? 'Y' : 'N', failed ? 'Y' : 'N');
- if (handler != NULL && !failed)
+ if (handler != NULL && !failed &&
+ (is_approved || _mcd_client_proxy_get_bypass_approval (handler)))
{
mcd_dispatch_operation_handle_channels (self, handler);
return TRUE;
--
1.5.6.5
More information about the telepathy-commits
mailing list