pidgin: e2e108d1: Don't bother sending a direct connection...

qulogic at pidgin.im qulogic at pidgin.im
Fri May 21 18:05:46 EDT 2010


-----------------------------------------------------------------
Revision: e2e108d13dda5ace4cdfa56a394d045311a86b3b
Ancestor: 56ce815eeb3b4a0939cbe3c2b48194e34c5b63e2
Author: qulogic at pidgin.im
Date: 2010-04-24T06:52:06
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/e2e108d13dda5ace4cdfa56a394d045311a86b3b

Modified files:
        libpurple/protocols/msn/slp.c

ChangeLog: 

Don't bother sending a direct connection request if the other side doesn't
support it. aMSN seems to say that they need MSNC1 to do direct connect.

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/slp.c	960d418ff8d1930104e98693d1d1fe12c41d86c3
+++ libpurple/protocols/msn/slp.c	d99838656cc477565c37792f18d872b011b68195
@@ -729,18 +729,25 @@ got_ok(MsnSlpCall *slpcall,
 		char *header;
 		MsnSlpMessage *msg;
 		MsnDirectConn *dc;
+		MsnUser *user;
 
 		if (slpcall->slplink->dc != NULL) {
-			/*
-			 * If we already have an established direct connection
+			/* If we already have an established direct connection
 			 * then just start the transfer.
 			 */
 			msn_slpcall_session_init(slpcall);
 			return;
 		}
 
+		user = msn_userlist_find_user(slpcall->slplink->session->userlist,
+		                              slpcall->slplink->remote_user);
+		if (!(user->clientid & 0xF0000000))	{
+			/* Just start a normal SB transfer. */
+			msn_slpcall_session_init(slpcall);
+			return;
+		}
+
 		/* Try direct file transfer by sending a second INVITE */
-
 		dc = msn_dc_new(slpcall);
 		slpcall->branch = rand_guid();
 


More information about the Commits mailing list