[telepathy-gabble/master] raise Offline error when trying to send a file to an offline contact

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Mon Mar 30 03:11:29 PDT 2009


---
 src/file-transfer-channel.c                        |    2 +-
 .../test-send-file-to-unknown-contact.py           |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/file-transfer-channel.c b/src/file-transfer-channel.c
index 8ab5da4..e696c82 100644
--- a/src/file-transfer-channel.c
+++ b/src/file-transfer-channel.c
@@ -1061,7 +1061,7 @@ gabble_file_transfer_channel_offer_file (GabbleFileTransferChannel *self,
     {
       DEBUG ("can't find contact's presence");
       if (error != NULL)
-        g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+        g_set_error (error, TP_ERRORS, TP_ERROR_OFFLINE,
             "can't find contact's presence");
 
       return FALSE;
diff --git a/tests/twisted/file-transfer/test-send-file-to-unknown-contact.py b/tests/twisted/file-transfer/test-send-file-to-unknown-contact.py
index 01f6d20..5fcafb9 100644
--- a/tests/twisted/file-transfer/test-send-file-to-unknown-contact.py
+++ b/tests/twisted/file-transfer/test-send-file-to-unknown-contact.py
@@ -16,7 +16,7 @@ class SendFileTransferToUnknownContactTest(SendFileTest):
         try:
             self.request_ft_channel()
         except dbus.DBusException, e:
-            assert e.get_dbus_name() == cs.NOT_AVAILABLE
+            assert e.get_dbus_name() == cs.OFFLINE
         else:
             assert False
 
-- 
1.5.6.5




More information about the telepathy-commits mailing list