From 4379430810ab2fddb43c4a7753b79d6705fa2d5d Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 19 May 2011 17:30:12 +0100 Subject: [PATCH 1/4] fd.o #34025 (ish): if we handle a channel internally, record that fact This means we'll include it in the set of handled channels when we invoke Observers with Recover=TRUE. We don't do this when calling _mcd_request_handle_internally (., ., FALSE) since we're not really behaving like a Handler in that case - more like an Observer or something. --- src/mcd-dispatch-operation.c | 4 ++++ src/mcd-handler-map-priv.h | 4 ++++ src/mcd-handler-map.c | 10 +++++++++- 3 files changed, 17 insertions(+), 1 deletions(-) diff --git a/src/mcd-dispatch-operation.c b/src/mcd-dispatch-operation.c index cb1e83a..adcecab 100644 --- a/src/mcd-dispatch-operation.c +++ b/src/mcd-dispatch-operation.c @@ -501,6 +501,10 @@ _mcd_dispatch_operation_check_client_locks (McdDispatchOperation *self) continue; DEBUG ("Internal handler for request channel #%u", i); + _mcd_handler_map_set_channel_handled_internally ( + self->priv->handler_map, + mcd_channel_get_tp_channel (channel), + _mcd_dispatch_operation_get_account_path (self)); _mcd_request_handle_internally (request, channel, TRUE); } diff --git a/src/mcd-handler-map-priv.h b/src/mcd-handler-map-priv.h index 7de292d..c90603f 100644 --- a/src/mcd-handler-map-priv.h +++ b/src/mcd-handler-map-priv.h @@ -86,6 +86,10 @@ GList *_mcd_handler_map_get_handled_channels (McdHandlerMap *self); const gchar *_mcd_handler_map_get_channel_account (McdHandlerMap *self, const gchar *channel_path); +void _mcd_handler_map_set_channel_handled_internally (McdHandlerMap *self, + TpChannel *channel, + const gchar *account_path); + G_END_DECLS #endif diff --git a/src/mcd-handler-map.c b/src/mcd-handler-map.c index 3e8e69a..933a0ae 100644 --- a/src/mcd-handler-map.c +++ b/src/mcd-handler-map.c @@ -423,4 +423,12 @@ _mcd_handler_map_get_channel_account (McdHandlerMap *self, channel_path); } - +void +_mcd_handler_map_set_channel_handled_internally (McdHandlerMap *self, + TpChannel *channel, + const gchar *account_path) +{ + _mcd_handler_map_set_channel_handled (self, channel, + tp_dbus_daemon_get_unique_name (self->priv->dbus_daemon), + NULL, account_path); +} -- 1.7.5.4