From 7b771c7fe5ec0f01ee960d2c8e8e05e1122b2da6 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Fri, 21 Nov 2008 16:24:36 +0000 Subject: Fix ref counting of tp_file, make it singleton per channel, and add a _keep_alive method that adds a tmp ref until the transfer finishes. svn path=/trunk/; revision=1904 --- libempathy/empathy-dispatcher.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'libempathy/empathy-dispatcher.c') diff --git a/libempathy/empathy-dispatcher.c b/libempathy/empathy-dispatcher.c index 4691ef6c1..21b6bcccb 100644 --- a/libempathy/empathy-dispatcher.c +++ b/libempathy/empathy-dispatcher.c @@ -957,11 +957,10 @@ file_channel_create_cb (TpConnection *connection, request->handle, NULL); - /* FIXME: tp_file is leaked, but we need to keep it alive until the data - * transfer is done. This is not the object that is going to be used - * for the ft manager. */ tp_file = empathy_tp_file_new (channel); empathy_tp_file_offer (tp_file, request->gfile, NULL); + empathy_tp_file_keep_alive (tp_file); + g_object_unref (tp_file); g_object_unref (request->gfile); g_slice_free (FileChannelRequest, request); -- cgit v1.2.3