[telepathy-mission-control/master] Keep context alive waiting for handler
Alberto Mardegan
alberto.mardegan at nokia.com
Thu May 7 09:29:36 PDT 2009
Don't let the context die while we are waiting for HandleChannels to return.
---
src/mcd-dispatcher.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/mcd-dispatcher.c b/src/mcd-dispatcher.c
index 1b3b14b..bc21e8c 100644
--- a/src/mcd-dispatcher.c
+++ b/src/mcd-dispatcher.c
@@ -268,6 +268,8 @@ mcd_dispatcher_context_ref (McdDispatcherContext *context)
static void
mcd_handler_call_data_free (McdHandlerCallData *call_data)
{
+ DEBUG ("called");
+ mcd_dispatcher_context_unref (call_data->context);
g_list_free (call_data->channels);
g_slice_free (McdHandlerCallData, call_data);
}
@@ -831,6 +833,7 @@ mcd_dispatcher_handle_channels (McdDispatcherContext *context,
* considered to be completed. */
handler_data = g_slice_new (McdHandlerCallData);
handler_data->context = context;
+ mcd_dispatcher_context_ref (context);
handler_data->channels = channels;
DEBUG ("Invoking handler %s (context %p)", handler->name, context);
mc_cli_client_handler_call_handle_channels (handler->proxy, -1,
--
1.5.6.5
More information about the telepathy-commits
mailing list