changeset 30867:6b73ff4fcc69

Get rid of the ack_size field in the SlpMessage in favor of the one in the Header. And do nothing if the released SlpMessage is an ACK or a 100 (DC Handshake).
author masca@cpw.pidgin.im
date Thu, 05 Aug 2010 23:16:49 +0000
parents b682664bae30
children 5964f65c17ed
files libpurple/protocols/msn/slplink.c libpurple/protocols/msn/slpmsg.c libpurple/protocols/msn/slpmsg.h
diffstat 3 files changed, 1 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/slplink.c	Thu Aug 05 23:09:12 2010 +0000
+++ b/libpurple/protocols/msn/slplink.c	Thu Aug 05 23:16:49 2010 +0000
@@ -359,10 +359,6 @@
 	{
 		slpmsg->header->ack_id = rand() % 0xFFFFFF00;
 	}
-	else if (slpmsg->flags == P2P_ACK)
-	{
-		slpmsg->header->ack_size = slpmsg->ack_size;
-	}
 	else if (slpmsg->flags == P2P_MSN_OBJ_DATA ||
 	         slpmsg->flags == (P2P_WML2009_COMP | P2P_MSN_OBJ_DATA) ||
 	         slpmsg->flags == P2P_FILE_DATA)
@@ -375,10 +371,6 @@
 		slpmsg->footer->value = slpcall->app_id;
 		slpmsg->header->ack_id = rand() % 0xFFFFFF00;
 	}
-	else if (slpmsg->flags == 0x100)
-	{
-		slpmsg->header->ack_size   = slpmsg->ack_size;
-	}
 
 	slpmsg->header->id = slpmsg->id;
 	slpmsg->header->flags = (guint32)slpmsg->flags;
--- a/libpurple/protocols/msn/slpmsg.c	Thu Aug 05 23:09:12 2010 +0000
+++ b/libpurple/protocols/msn/slpmsg.c	Thu Aug 05 23:16:49 2010 +0000
@@ -247,7 +247,7 @@
 	slpmsg->flags      = P2P_ACK;
 	slpmsg->header->ack_id     = header->id;
 	slpmsg->header->ack_sub_id = header->ack_id;
-	slpmsg->ack_size   = header->total_size;
+	slpmsg->header->ack_size   = header->total_size;
 	slpmsg->info = "SLP ACK";
 
 	return slpmsg;
--- a/libpurple/protocols/msn/slpmsg.h	Thu Aug 05 23:09:12 2010 +0000
+++ b/libpurple/protocols/msn/slpmsg.h	Thu Aug 05 23:16:49 2010 +0000
@@ -49,7 +49,6 @@
 	MsnP2PFooter *footer;
 
 	long id;
-	long long ack_size;
 
 	gboolean sip; /**< A flag that states if this is a SIP slp message. */
 	long flags;