cpw.malu.xmpp.jingle_ft: 700c17a1: Send a transport-info with a <streamhost...

malu at pidgin.im malu at pidgin.im
Mon May 4 14:15:32 EDT 2009


-----------------------------------------------------------------
Revision: 700c17a19c46f73e12033adc5aeea9df11c17d36
Ancestor: 3f8707886ab380169ef8631ba9ceb3a45d1c872b
Author: malu at pidgin.im
Date: 2009-05-04T18:12:36
Branch: im.pidgin.cpw.malu.xmpp.jingle_ft
URL: http://d.pidgin.im/viewmtn/revision/info/700c17a19c46f73e12033adc5aeea9df11c17d36

Modified files:
        libpurple/protocols/jabber/jingle/s5b.c

ChangeLog: 

Send a transport-info with a <streamhost-error/> when failing to connect to
any of the supplied streamhosts.
Still doesn't do fallback to IBB, though...

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jingle/s5b.c	0df939f7d740ab0803a8c4e04c633c0838b886fe
+++ libpurple/protocols/jabber/jingle/s5b.c	3f599e599cd59079cbc0425948cbe0c4df840dde
@@ -1183,7 +1183,14 @@ jingle_s5b_attempt_connect_internal(gpoi
 			FALSE, jingle_s5b_connect_cb, jingle_s5b_connect_timeout_cb);
 	} else {
 		/* send streamhost error */
-		
+		JabberIq *streamhost_error =
+			jingle_session_to_packet(session, JINGLE_TRANSPORT_INFO);
+		xmlnode *content = 
+			xmlnode_get_child(streamhost_error->node, "content");
+		xmlnode *transport = xmlnode_get_child(content, "transport");
+
+		xmlnode_insert_child(transport, xmlnode_new("streamhost-error"));
+		jabber_iq_send(streamhost_error);
 		g_free(data);
 	}
 }


More information about the Commits mailing list