[Telepathy-commits] [telepathy-salut/master] gibber-oob-file-transfer: if the error code is not in the 'code' attribute, try the 'type' one as iChat uses it

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Fri Nov 28 04:35:38 PST 2008


---
 lib/gibber/gibber-oob-file-transfer.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/lib/gibber/gibber-oob-file-transfer.c b/lib/gibber/gibber-oob-file-transfer.c
index 06cb7b8..0eef046 100644
--- a/lib/gibber/gibber-oob-file-transfer.c
+++ b/lib/gibber/gibber-oob-file-transfer.c
@@ -747,6 +747,9 @@ gibber_oob_file_transfer_received_stanza (GibberFileTransfer *ft,
 
       /* FIXME copy the error handling code from gabble */
       error_code_str = gibber_xmpp_node_get_attribute (error_node, "code");
+      if (error_code_str == NULL)
+        /* iChat uses the 'type' attribute to transmit the error code */
+        error_code_str = gibber_xmpp_node_get_attribute (error_node, "type");
 
       if (error_code_str != NULL && g_ascii_strtoll (error_code_str, NULL,
             10) == 406)
-- 
1.5.6.5




More information about the Telepathy-commits mailing list