diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2009-11-03 12:50:43 +0000 |
---|---|---|
committer | Vivek Dasmohapatra <vivek@collabora.co.uk> | 2010-02-01 17:36:27 +0000 |
commit | f86a0c4d613dd5ce587d88a27d569b5af35e378a (patch) | |
tree | daf7b2fe0f3e096626f55a1fedb4c2c073165dee | |
parent | 3fe828a9518f7ede54350052cf2ae53c431609c3 (diff) |
McdDispatchOperation: don't run Approvers early if a plugin has already decided to terminate the channels after observers finish
-rw-r--r-- | src/mcd-dispatch-operation.c | 4 | ||||
-rw-r--r-- | src/plugin-dispatch-operation.c | 7 | ||||
-rw-r--r-- | src/plugin-dispatch-operation.h | 3 |
3 files changed, 13 insertions, 1 deletions
diff --git a/src/mcd-dispatch-operation.c b/src/mcd-dispatch-operation.c index 7caf560f..a85c38c9 100644 --- a/src/mcd-dispatch-operation.c +++ b/src/mcd-dispatch-operation.c @@ -406,7 +406,9 @@ _mcd_dispatch_operation_check_client_locks (McdDispatchOperation *self) * return, then run that handler, then proceed with the other handlers. */ if (!self->priv->tried_handlers_before_approval && !_mcd_dispatch_operation_handlers_can_bypass_approval (self) - && self->priv->channels != NULL) + && self->priv->channels != NULL && + ! _mcd_plugin_dispatch_operation_will_terminate ( + self->priv->plugin_api)) { self->priv->tried_handlers_before_approval = TRUE; diff --git a/src/plugin-dispatch-operation.c b/src/plugin-dispatch-operation.c index 4682e04b..99d532d4 100644 --- a/src/plugin-dispatch-operation.c +++ b/src/plugin-dispatch-operation.c @@ -377,6 +377,13 @@ _mcd_plugin_dispatch_operation_observers_finished ( } } +gboolean +_mcd_plugin_dispatch_operation_will_terminate ( + McdPluginDispatchOperation *self) +{ + return (self->after_observers != PLUGIN_ACTION_NONE); +} + static void plugin_iface_init (McpDispatchOperationIface *iface, gpointer unused G_GNUC_UNUSED) diff --git a/src/plugin-dispatch-operation.h b/src/plugin-dispatch-operation.h index 03c9826f..da329756 100644 --- a/src/plugin-dispatch-operation.h +++ b/src/plugin-dispatch-operation.h @@ -62,6 +62,9 @@ McdPluginDispatchOperation *_mcd_plugin_dispatch_operation_new ( G_GNUC_INTERNAL void _mcd_plugin_dispatch_operation_observers_finished ( McdPluginDispatchOperation *self); +G_GNUC_INTERNAL gboolean _mcd_plugin_dispatch_operation_will_terminate ( + McdPluginDispatchOperation *self); + G_END_DECLS #endif |