[Telepathy-commits] [telepathy-salut/master] Emit the canceled state on the file channel before closing it.
Jonny Lamb
jonny.lamb at collabora.co.uk
Fri Nov 21 03:46:16 PST 2008
20080804185418-8ed0e-cbf1a34ae62b9f2b12a6b5151668fe351d9e2363.gz
---
src/salut-file-channel.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/salut-file-channel.c b/src/salut-file-channel.c
index d57a726..14d1d0d 100644
--- a/src/salut-file-channel.c
+++ b/src/salut-file-channel.c
@@ -688,6 +688,12 @@ static void
salut_file_channel_close (TpSvcChannel *iface,
DBusGMethodInvocation *context)
{
+ SalutFileChannel *self = SALUT_FILE_CHANNEL (iface);
+
+ if (self->priv->state != SALUT_FILE_TRANSFER_STATE_COMPLETED)
+ salut_file_channel_set_state (SALUT_SVC_CHANNEL_TYPE_FILE (iface),
+ SALUT_FILE_TRANSFER_STATE_CANCELED,
+ SALUT_FILE_TRANSFER_STATE_CHANGE_REASON_NONE);
salut_file_channel_do_close (SALUT_FILE_CHANNEL (iface));
tp_svc_channel_return_from_close (context);
}
--
1.5.6.5
More information about the Telepathy-commits
mailing list