summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVivek Dasmohapatra <vivek@collabora.co.uk>2011-05-20 20:29:30 +0100
committerVivek Dasmohapatra <vivek@collabora.co.uk>2011-05-24 15:18:18 +0100
commit0c7cb7baad42bf7be3415403bb6610680e3c2c36 (patch)
treec33d79388fd5498b0b72ba0925e53db4c272142c
parent631b061c3a431acef9ff16d5b9fa326f08741e6a (diff)
downloadtelepathy-mission-control-0c7cb7baad42bf7be3415403bb6610680e3c2c36.tar.gz
Internal requests should be handled in _both_ paths through _add_channel_request
-rw-r--r--src/mcd-dispatcher.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/mcd-dispatcher.c b/src/mcd-dispatcher.c
index fcb2d0b3..7c28f685 100644
--- a/src/mcd-dispatcher.c
+++ b/src/mcd-dispatcher.c
@@ -1651,6 +1651,8 @@ _mcd_dispatcher_add_channel_request (McdDispatcher *dispatcher,
McdChannel *channel, McdChannel *request)
{
McdChannelStatus status;
+ McdRequest *origin = _mcd_channel_get_request (request);
+ gboolean internal = _mcd_request_is_internal (origin);
status = mcd_channel_get_status (channel);
@@ -1658,29 +1660,32 @@ _mcd_dispatcher_add_channel_request (McdDispatcher *dispatcher,
* is not, @request must mirror the status of @channel */
if (status == MCD_CHANNEL_STATUS_DISPATCHED)
{
- McdRequest *origin = _mcd_channel_get_request (request);
- DEBUG ("reinvoking handler on channel %p", channel);
+ DEBUG ("reinvoking handler on channel %p", request);
/* copy the object path and the immutable properties from the
* existing channel */
_mcd_channel_copy_details (request, channel);
- DEBUG ("checking if ensured channel should be handled internaly");
- if (_mcd_request_is_internal (origin))
+ if (internal)
_mcd_request_handle_internally (origin, request, FALSE);
else
_mcd_dispatcher_reinvoke_handler (dispatcher, request);
}
else
{
- const gchar *preferred_handler =
- _mcd_channel_get_request_preferred_handler (request);
-
+ DEBUG ("non-reinvoked handling of channel %p", request);
_mcd_channel_set_request_proxy (request, channel);
- if (status == MCD_CHANNEL_STATUS_DISPATCHING)
+
+ if (internal)
+ {
+ _mcd_request_handle_internally (origin, request, FALSE);
+ }
+ else if (status == MCD_CHANNEL_STATUS_DISPATCHING)
{
McdDispatchOperation *op = find_operation_from_channel (dispatcher,
channel);
+ const gchar *preferred_handler =
+ _mcd_channel_get_request_preferred_handler (request);
g_return_if_fail (op != NULL);