cpw.malu.xmpp.jingle_ft: 8c4d7a42: Generate <streamhost/> elements even whe..

malu at pidgin.im malu at pidgin.im
Sat Mar 28 22:45:47 EDT 2009


-----------------------------------------------------------------
Revision: 8c4d7a427e9f815e0a40eea66bca838759c88a0f
Ancestor: 5ab15cea338889dc3bb59311cff5fcd6bf2b2ea7
Author: malu at pidgin.im
Date: 2009-03-29T02:41:48
Branch: im.pidgin.cpw.malu.xmpp.jingle_ft
URL: http://d.pidgin.im/viewmtn/revision/info/8c4d7a427e9f815e0a40eea66bca838759c88a0f

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

ChangeLog: 

Generate <streamhost/> elements even when not successful in opening a port
locally (in case there is bytestream proxies known).
Added comment about not sending <streamhost/>s in case the other end has
working streamhosts.

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jingle/s5b.c	560fbfe8aa49669cf9ddf8232702b9609df89a5b
+++ libpurple/protocols/jabber/jingle/s5b.c	34815a3ac1dd2e4dad3b4d5daa0a9f39c0dc9e13
@@ -363,6 +363,9 @@ jingle_s5b_listen_cb(int sock, gpointer 
 					jingle_s5b_streamhost_copy(sh));		
 		}
 	}
+	/* note: even if we couldn't obtain a local port and no bytestream
+	 proxies where found above, we should not revert to IBB just yet, since
+	 the other end might have working streamhosts... */
 	
 	/* if we are the initiator send session-initiate */
 	if (jingle_session_is_initiator(session)) {
@@ -385,4 +388,10 @@ jingle_s5b_gather_streamhosts(JingleSess
 	JINGLE_S5B_GET_PRIVATE(s5b)->listen_data = 
 		purple_network_listen_range(0, 0, SOCK_STREAM, jingle_s5b_listen_cb,
 			data);
+	
+	if (JINGLE_S5B_GET_PRIVATE(s5b)->listen_data == NULL) {
+		/* could not listen on a local port, will try to use only proxies,
+		 if possible */
+		jingle_s5b_listen_cb(-1, data);
+	}
 }


More information about the Commits mailing list