soc.2010.msn-tlc: ddf2ac02: Get rid of the ack_size field in the Slp...

masca at cpw.pidgin.im masca at cpw.pidgin.im
Thu Aug 5 22:01:15 EDT 2010


----------------------------------------------------------------------
Revision: ddf2ac024b480ecf6e8ec9eeb9ff8b03841dd47d
Parent:   36afe910b277239a707ff3a0e9ced376aaa91240
Author:   masca at cpw.pidgin.im
Date:     08/05/10 19:16:49
Branch:   im.pidgin.soc.2010.msn-tlc
URL: http://d.pidgin.im/viewmtn/revision/info/ddf2ac024b480ecf6e8ec9eeb9ff8b03841dd47d

Changelog: 

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).

Changes against parent 36afe910b277239a707ff3a0e9ced376aaa91240

  patched  libpurple/protocols/msn/slplink.c
  patched  libpurple/protocols/msn/slpmsg.c
  patched  libpurple/protocols/msn/slpmsg.h

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/slplink.c	8e69f46acd19e685a1ef3dc5935533a2f992e4b9
+++ libpurple/protocols/msn/slplink.c	9134e1854ae4b065c5e68f97ff3bf057952b0775
@@ -359,10 +359,6 @@ msn_slplink_release_slpmsg(MsnSlpLink *s
 	{
 		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 @@ msn_slplink_release_slpmsg(MsnSlpLink *s
 		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;
============================================================
--- libpurple/protocols/msn/slpmsg.c	8d3331404e0f902da3062658906ac2d6d945db97
+++ libpurple/protocols/msn/slpmsg.c	5a85d31dc49cddc484f9880a64bdb825a19e7eaf
@@ -247,7 +247,7 @@ MsnSlpMessage *msn_slpmsg_ack_new(MsnP2P
 	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;
============================================================
--- libpurple/protocols/msn/slpmsg.h	f83e2fa18d8eb77f73909fe4c9319520bb007682
+++ libpurple/protocols/msn/slpmsg.h	90d1d11d7594744bbeafff8d4256496518428066
@@ -49,7 +49,6 @@ struct _MsnSlpMessage
 	MsnP2PFooter *footer;
 
 	long id;
-	long long ack_size;
 
 	gboolean sip; /**< A flag that states if this is a SIP slp message. */
 	long flags;


More information about the Commits mailing list