aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-tp-file.c
diff options
context:
space:
mode:
authorxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2008-11-22 00:23:38 +0800
committerxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2008-11-22 00:23:38 +0800
commitd1c0437f97e506557101056b7b558339cab9ec47 (patch)
tree29b92a5c44a2dadaf652d1a83e216d93d6362bd6 /libempathy/empathy-tp-file.c
parentcebde15f6a1804ad34a65d47479447cc405e9b6f (diff)
downloadgsoc2013-empathy-d1c0437f97e506557101056b7b558339cab9ec47.tar
gsoc2013-empathy-d1c0437f97e506557101056b7b558339cab9ec47.tar.gz
gsoc2013-empathy-d1c0437f97e506557101056b7b558339cab9ec47.tar.bz2
gsoc2013-empathy-d1c0437f97e506557101056b7b558339cab9ec47.tar.lz
gsoc2013-empathy-d1c0437f97e506557101056b7b558339cab9ec47.tar.xz
gsoc2013-empathy-d1c0437f97e506557101056b7b558339cab9ec47.tar.zst
gsoc2013-empathy-d1c0437f97e506557101056b7b558339cab9ec47.zip
Simplify a little bit the code when abording a FT
git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1889 4ee84921-47dd-4033-b63a-18d7a039a3e4
Diffstat (limited to 'libempathy/empathy-tp-file.c')
-rw-r--r--libempathy/empathy-tp-file.c9
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