cpw.malu.xmpp.jingle_ft: 059f337d: When being the receiver don't try to con...

malu at pidgin.im malu at pidgin.im
Sun Apr 5 17:45:38 EDT 2009


-----------------------------------------------------------------
Revision: 059f337dd2e8188dd84a4b885fb6f5caa9245629
Ancestor: e376edbf006d77ee04ae5c73d3f015133f4f4a60
Author: malu at pidgin.im
Date: 2009-04-05T21:42:54
Branch: im.pidgin.cpw.malu.xmpp.jingle_ft
URL: http://d.pidgin.im/viewmtn/revision/info/059f337dd2e8188dd84a4b885fb6f5caa9245629

Modified files:
        libpurple/protocols/jabber/jingle/file-transfer.c
        libpurple/protocols/jabber/jingle/s5b.c

ChangeLog: 

When being the receiver don't try to connect to the remote streamhosts before
we have gathered our local streamhosts, and sent session-accept.

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jingle/file-transfer.c	0f6c1e54962127807d67ecb86f1321e7fd7e7f26
+++ libpurple/protocols/jabber/jingle/file-transfer.c	cd8c06e7d02b55a1f45b88411d29529721281c8d
@@ -487,8 +487,7 @@ jingle_file_transfer_xfer_init(PurpleXfe
 			/* start the transfer */
 			purple_xfer_start(xfer, 0, NULL, 0);
 		} else if (JINGLE_IS_S5B(transport)) {
-			jingle_s5b_attempt_connect(session, JINGLE_S5B(transport));
-			jingle_s5b_gather_streamhosts(session, JINGLE_S5B(transport));	
+			jingle_s5b_gather_streamhosts(session, JINGLE_S5B(transport));
 		}
 		g_object_unref(session);
 		g_object_unref(transport);
============================================================
--- libpurple/protocols/jabber/jingle/s5b.c	9a6e7d7084e8beeaa27ec86c540e680dac3dbd9a
+++ libpurple/protocols/jabber/jingle/s5b.c	c13374c3f78166c7a3927212e5f7a3aba255e19e
@@ -775,7 +775,15 @@ jingle_s5b_listen_cb(int sock, gpointer 
 	} else {
 		jabber_iq_send(jingle_session_to_packet(session,
 			JINGLE_SESSION_ACCEPT));
+		/* now we can attempt to connect to the streamhosts the other end
+		 handed to us... */
+		jingle_s5b_attempt_connect(session, s5b);
+		/* Note: this is done in the respective content handler for the
+		 initiator, since the initiator needs to wait for session-accept to get
+		 streamhost candidates, while as the receiver we need to do it here,
+		 since we can't do it before having sent session-accept */
 	}
+	
 	g_object_unref(session);
 }
 


More information about the Commits mailing list