pidgin: e6af6508: We don't pack P2P header or footer, so t...

qulogic at pidgin.im qulogic at pidgin.im
Tue Jan 11 00:40:47 EST 2011


----------------------------------------------------------------------
Revision: e6af6508a94951bfea63caba1fc4f85932cea3a3
Parent:   2aa73fd9f4749a6095de1e69ccc4480a813e3ac2
Author:   qulogic at pidgin.im
Date:     01/11/11 00:24:33
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/e6af6508a94951bfea63caba1fc4f85932cea3a3

Changelog: 

We don't pack P2P header or footer, so this memdup won't work.

Changes against parent 2aa73fd9f4749a6095de1e69ccc4480a813e3ac2

  patched  libpurple/protocols/msn/slpmsg_part.c

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/slpmsg_part.c	9543defc28ca403434b3f81587bd46be7f75216c
+++ libpurple/protocols/msn/slpmsg_part.c	f0f8a11988967c13c91a870b8bd4ee6f030ac32c
@@ -34,10 +34,14 @@ MsnSlpMessagePart *msn_slpmsgpart_new(Ms
 
 	part = g_new0(MsnSlpMessagePart, 1);
 
-	if (header)
-		part->header = g_memdup(header, P2P_PACKET_HEADER_SIZE);
-	if (footer)
-		part->footer = g_memdup(footer, P2P_PACKET_FOOTER_SIZE);
+	if (header) {
+		part->header = g_new0(MsnP2PHeader, 1);
+		*part->header = *header;
+	}
+	if (footer) {
+		part->footer = g_new0(MsnP2PFooter, 1);
+		*part->footer = *footer;
+	}
 
 	part->ack_cb = msn_slpmsgpart_ack;
 	part->nak_cb = msn_slpmsgpart_nak;


More information about the Commits mailing list