diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2008-11-22 00:23:38 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2008-11-22 00:23:38 +0800 |
commit | 640563410df851acb963e6568c706eca936d5cb2 (patch) | |
tree | 29b92a5c44a2dadaf652d1a83e216d93d6362bd6 | |
parent | 8efea52483150c801e88848981f5aaf94cc57538 (diff) | |
download | gsoc2013-empathy-640563410df851acb963e6568c706eca936d5cb2.tar gsoc2013-empathy-640563410df851acb963e6568c706eca936d5cb2.tar.gz gsoc2013-empathy-640563410df851acb963e6568c706eca936d5cb2.tar.bz2 gsoc2013-empathy-640563410df851acb963e6568c706eca936d5cb2.tar.lz gsoc2013-empathy-640563410df851acb963e6568c706eca936d5cb2.tar.xz gsoc2013-empathy-640563410df851acb963e6568c706eca936d5cb2.tar.zst gsoc2013-empathy-640563410df851acb963e6568c706eca936d5cb2.zip |
Simplify a little bit the code when abording a FT
svn path=/trunk/; revision=1889
-rw-r--r-- | libempathy/empathy-tp-file.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libempathy/empathy-tp-file.c b/libempathy/empathy-tp-file.c index f3dbe935a..3d2cedf79 100644 --- a/libempathy/empathy-tp-file.c +++ b/libempathy/empathy-tp-file.c @@ -397,7 +397,7 @@ tp_file_start_transfer (EmpathyTpFile *tp_file) if (fd < 0) { DEBUG ("Failed to create socket, closing channel"); - tp_cli_channel_call_close (tp_file->priv->channel, -1, NULL, NULL, NULL, NULL); + empathy_tp_file_cancel (tp_file); return; } @@ -409,7 +409,7 @@ tp_file_start_transfer (EmpathyTpFile *tp_file) if (connect (fd, (struct sockaddr*) &addr, sizeof (addr)) < 0) { DEBUG ("Failed to connect socket, closing channel"); - tp_cli_channel_call_close (tp_file->priv->channel, -1, NULL, NULL, NULL, NULL); + empathy_tp_file_cancel (tp_file); close (fd); return; } @@ -709,7 +709,7 @@ tp_file_method_cb (TpProxy *proxy, if (error) { DEBUG ("Error: %s", error->message); - tp_cli_channel_call_close (tp_file->priv->channel, -1, NULL, NULL, NULL, NULL); + empathy_tp_file_cancel (tp_file); return; } @@ -869,7 +869,8 @@ empathy_tp_file_cancel (EmpathyTpFile *tp_file) tp_cli_channel_call_close (tp_file->priv->channel, -1, NULL, NULL, NULL, NULL); - g_cancellable_cancel (tp_file->priv->cancellable); + if (tp_file->priv->cancellable != NULL) + g_cancellable_cancel (tp_file->priv->cancellable); } static void |