aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-tp-file.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-11-22 00:23:46 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-11-22 00:23:46 +0800
commit921e862b7b56d76a1d11fcaa2edcd4d5aafab6c5 (patch)
tree13225f0bb686f19acdcb4e9a8b15d76ed7714c3c /libempathy/empathy-tp-file.c
parent59aa7a6bfb542224c2421b55238691741e53cf7c (diff)
downloadgsoc2013-empathy-921e862b7b56d76a1d11fcaa2edcd4d5aafab6c5.tar
gsoc2013-empathy-921e862b7b56d76a1d11fcaa2edcd4d5aafab6c5.tar.gz
gsoc2013-empathy-921e862b7b56d76a1d11fcaa2edcd4d5aafab6c5.tar.bz2
gsoc2013-empathy-921e862b7b56d76a1d11fcaa2edcd4d5aafab6c5.tar.lz
gsoc2013-empathy-921e862b7b56d76a1d11fcaa2edcd4d5aafab6c5.tar.xz
gsoc2013-empathy-921e862b7b56d76a1d11fcaa2edcd4d5aafab6c5.tar.zst
gsoc2013-empathy-921e862b7b56d76a1d11fcaa2edcd4d5aafab6c5.zip
Change state when the channel is invalidated only if an error occured.
svn path=/trunk/; revision=1891
Diffstat (limited to 'libempathy/empathy-tp-file.c')
-rw-r--r--libempathy/empathy-tp-file.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/libempathy/empathy-tp-file.c b/libempathy/empathy-tp-file.c
index 3d2cedf79..38f54a386 100644
--- a/libempathy/empathy-tp-file.c
+++ b/libempathy/empathy-tp-file.c
@@ -332,11 +332,17 @@ tp_file_invalidated_cb (TpProxy *proxy,
gchar *message,
EmpathyTpFile *tp_file)
{
- DEBUG ("Channel invalidated: %s", message);
- tp_file->priv->state = EMP_FILE_TRANSFER_STATE_CANCELLED;
- tp_file->priv->state_change_reason =
- EMP_FILE_TRANSFER_STATE_CHANGE_REASON_LOCAL_ERROR;
- g_object_notify (G_OBJECT (tp_file), "state");
+ DEBUG ("Channel invalidated: %s", message);
+
+ if (tp_file->priv->state != EMP_FILE_TRANSFER_STATE_COMPLETED &&
+ tp_file->priv->state != EMP_FILE_TRANSFER_STATE_CANCELLED)
+ {
+ /* The channel is not in a finished state, an error occured */
+ tp_file->priv->state = EMP_FILE_TRANSFER_STATE_CANCELLED;
+ tp_file->priv->state_change_reason =
+ EMP_FILE_TRANSFER_STATE_CHANGE_REASON_LOCAL_ERROR;
+ g_object_notify (G_OBJECT (tp_file), "state");
+ }
}
static void