[Telepathy-commits] [telepathy-salut/master] contact_lost_cb: close the transfer only if it was pending
Guillaume Desmottes
guillaume.desmottes at collabora.co.uk
Tue Dec 9 09:22:40 PST 2008
---
src/salut-file-transfer-channel.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/salut-file-transfer-channel.c b/src/salut-file-transfer-channel.c
index 80b7fab..d97c12c 100644
--- a/src/salut-file-transfer-channel.c
+++ b/src/salut-file-transfer-channel.c
@@ -176,6 +176,13 @@ contact_lost_cb (SalutContact *contact,
{
g_assert (contact == self->priv->contact);
+ if (self->priv->state != SALUT_FILE_TRANSFER_STATE_PENDING)
+ {
+ DEBUG ("%s was disconnected. Ignoring as there is still a chance to"
+ " be able to complete the transfer", contact->name);
+ return;
+ }
+
DEBUG ("%s was disconnected. Cancel file tranfer.", contact->name);
salut_file_transfer_channel_set_state (
SALUT_SVC_CHANNEL_TYPE_FILE_TRANSFER (self),
--
1.5.6.5
More information about the Telepathy-commits
mailing list