From 0c7cb7baad42bf7be3415403bb6610680e3c2c36 Mon Sep 17 00:00:00 2001 From: Vivek Dasmohapatra Date: Fri, 20 May 2011 20:29:30 +0100 Subject: Internal requests should be handled in _both_ paths through _add_channel_request --- src/mcd-dispatcher.c | 21 +++++++++++++-------- 1 file 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); -- cgit v1.2.1