diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2008-11-22 00:23:46 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2008-11-22 00:23:46 +0800 |
commit | 921e862b7b56d76a1d11fcaa2edcd4d5aafab6c5 (patch) | |
tree | 13225f0bb686f19acdcb4e9a8b15d76ed7714c3c | |
parent | 59aa7a6bfb542224c2421b55238691741e53cf7c (diff) | |
download | gsoc2013-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
-rw-r--r-- | libempathy/empathy-tp-file.c | 16 |
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 |