aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-dispatcher.c
diff options
context:
space:
mode:
authorxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2008-11-22 00:24:36 +0800
committerxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2008-11-22 00:24:36 +0800
commited1732d95cc8750f7713cbc2f5446351ee1d35e6 (patch)
treeda59f2854e675d31b2483dcd84d7ff0608e30408 /libempathy/empathy-dispatcher.c
parent5f6365cbb646cb44bd55604fabb17acd0baf4fa4 (diff)
downloadgsoc2013-empathy-ed1732d95cc8750f7713cbc2f5446351ee1d35e6.tar
gsoc2013-empathy-ed1732d95cc8750f7713cbc2f5446351ee1d35e6.tar.gz
gsoc2013-empathy-ed1732d95cc8750f7713cbc2f5446351ee1d35e6.tar.bz2
gsoc2013-empathy-ed1732d95cc8750f7713cbc2f5446351ee1d35e6.tar.lz
gsoc2013-empathy-ed1732d95cc8750f7713cbc2f5446351ee1d35e6.tar.xz
gsoc2013-empathy-ed1732d95cc8750f7713cbc2f5446351ee1d35e6.tar.zst
gsoc2013-empathy-ed1732d95cc8750f7713cbc2f5446351ee1d35e6.zip
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.
git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1904 4ee84921-47dd-4033-b63a-18d7a039a3e4
Diffstat (limited to 'libempathy/empathy-dispatcher.c')
-rw-r--r--libempathy/empathy-dispatcher.c5
1 files changed, 2 insertions, 3 deletions
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);