diff libpurple/protocols/msn/slplink.c @ 25335: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 36897ddd3e08
children 9931796e1765 0c796a1950b7
line wrap: on
line diff
--- 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 */