changeset 24965:bcedd3b2ca69

A patch from Thomas Gibson-Robinson to fix receiving buddy icons, custom emoticons and file transfers from WLM 9. I have a feeling this should really be a bitwise test (ie, flags | 0x20 == 0x20) but I can't really find many supportive docs for FT things and I'm no expert on these MSN SLP bits. Fixes #7180. Fixes #7294.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Mon, 19 Jan 2009 00:58:19 +0000
parents 8a5c0c5c71f9
children 5c7fee60853b
files libpurple/protocols/msn/slpcall.c libpurple/protocols/msn/slplink.c
diffstat 2 files changed, 17 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/slpcall.c	Thu Jan 15 03:56:58 2009 +0000
+++ b/libpurple/protocols/msn/slpcall.c	Mon Jan 19 00:58:19 2009 +0000
@@ -206,7 +206,7 @@
 	body = slpmsg->buffer;
 	body_len = slpmsg->size;
 
-	if (slpmsg->flags == 0x0)
+	if (slpmsg->flags == 0x0 || slpmsg->flags == 0x1000000)
 	{
 		char *body_str;
 
@@ -214,7 +214,9 @@
 		slpcall = msn_slp_sip_recv(slplink, body_str);
 		g_free(body_str);
 	}
-	else if (slpmsg->flags == 0x20 || slpmsg->flags == 0x1000030)
+	else if (slpmsg->flags == 0x20 ||
+	         slpmsg->flags == 0x1000020 ||
+	         slpmsg->flags == 0x1000030)
 	{
 		slpcall = msn_slplink_find_slp_call_with_session_id(slplink, slpmsg->session_id);
 
--- a/libpurple/protocols/msn/slplink.c	Thu Jan 15 03:56:58 2009 +0000
+++ b/libpurple/protocols/msn/slplink.c	Mon Jan 19 00:58:19 2009 +0000
@@ -281,7 +281,8 @@
 		g_list_append(slpmsg->msgs, msg);
 	msn_slplink_send_msg(slplink, msg);
 
-	if ((slpmsg->flags == 0x20 || slpmsg->flags == 0x1000030) &&
+	if ((slpmsg->flags == 0x20 || slpmsg->flags == 0x1000020 ||
+	     slpmsg->flags == 0x1000030) &&
 		(slpmsg->slpcall != NULL))
 	{
 		slpmsg->slpcall->progress = TRUE;
@@ -316,7 +317,8 @@
 	else
 	{
 		/* The whole message has been sent */
-		if (slpmsg->flags == 0x20 || slpmsg->flags == 0x1000030)
+		if (slpmsg->flags == 0x20 ||
+		    slpmsg->flags == 0x1000020 || slpmsg->flags == 0x1000030)
 		{
 			if (slpmsg->slpcall != NULL)
 			{
@@ -362,7 +364,8 @@
 		msg->msnslp_header.ack_size = slpmsg->ack_size;
 		msg->msnslp_header.ack_sub_id = slpmsg->ack_sub_id;
 	}
-	else if (slpmsg->flags == 0x20 || slpmsg->flags == 0x1000030)
+	else if (slpmsg->flags == 0x20 ||
+	         slpmsg->flags == 0x1000020 || slpmsg->flags == 0x1000030)
 	{
 		MsnSlpCall *slpcall;
 		slpcall = slpmsg->slpcall;
@@ -532,7 +535,8 @@
 
 			if (slpmsg->slpcall != NULL)
 			{
-				if (slpmsg->flags == 0x20 || slpmsg->flags == 0x1000030)
+				if (slpmsg->flags == 0x20 ||
+				    slpmsg->flags == 0x1000020 || slpmsg->flags == 0x1000030)
 				{
 					PurpleXfer *xfer;
 
@@ -595,7 +599,8 @@
 			memcpy(slpmsg->buffer + offset, data, len);
 	}
 
-	if ((slpmsg->flags == 0x20 || slpmsg->flags == 0x1000030) &&
+	if ((slpmsg->flags == 0x20 ||
+	     slpmsg->flags == 0x1000020 || slpmsg->flags == 0x1000030) &&
 		(slpmsg->slpcall != NULL))
 	{
 		slpmsg->slpcall->progress = TRUE;
@@ -630,8 +635,9 @@
 				msn_directconn_send_handshake(directconn);
 #endif
 		}
-		else if (slpmsg->flags == 0x0 || slpmsg->flags == 0x20 ||
-				 slpmsg->flags == 0x1000030)
+		else if (slpmsg->flags == 0x00 || slpmsg->flags == 0x1000000 ||  
+		         slpmsg->flags == 0x20 || slpmsg->flags == 0x1000020 ||  
+		         slpmsg->flags == 0x1000030)
 		{
 			/* Release all the messages and send the ACK */