[Telepathy-commits] [telepathy-salut/master] Cancel the gibber file transfer when the recipient cancels the transfer, so that the sender receives a "canceled" signal.

Jonny Lamb jonny.lamb at collabora.co.uk
Fri Nov 21 03:46:17 PST 2008


20080805172534-8ed0e-b1f499d0b786bafc0f528ecbd6839d727eecb286.gz
---
 src/salut-file-channel.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/salut-file-channel.c b/src/salut-file-channel.c
index ef20856..83e7f9c 100644
--- a/src/salut-file-channel.c
+++ b/src/salut-file-channel.c
@@ -691,9 +691,13 @@ salut_file_channel_close (TpSvcChannel *iface,
   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_LOCAL_STOPPED);
+    {
+      gibber_file_transfer_cancel (self->priv->ft, 406);
+      salut_file_channel_set_state (SALUT_SVC_CHANNEL_TYPE_FILE (iface),
+          SALUT_FILE_TRANSFER_STATE_CANCELED,
+          SALUT_FILE_TRANSFER_STATE_CHANGE_REASON_LOCAL_STOPPED);
+    }
+
   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