Mercurial > pidgin
diff libpurple/protocols/msn/directconn.c @ 31120:e9b9d6ba2cff
merge of 'b37e581d0bfe6efa24595ece99a284dd51c08d78'
and 'ddda3b9ca9b6cf8b06736f8b59b92683511117df'
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sun, 09 Jan 2011 04:54:17 +0000 |
parents | 5de2d1b3669c |
children | 9a23c70bdb7a |
line wrap: on
line diff
--- a/libpurple/protocols/msn/directconn.c Sat Jan 08 17:14:54 2011 +0000 +++ b/libpurple/protocols/msn/directconn.c Sun Jan 09 04:54:17 2011 +0000 @@ -539,13 +539,11 @@ msn_dc_enqueue_part(MsnDirectConn *dc, MsnSlpMessagePart *part) { MsnDirectConnPacket *p; - guint32 length; + size_t length; - length = part->size + P2P_PACKET_HEADER_SIZE; - p = msn_dc_new_packet(length); - - memcpy(p->data, part->header, P2P_PACKET_HEADER_SIZE); - memcpy(p->data + P2P_PACKET_HEADER_SIZE, part->buffer, part->size); + p = msn_dc_new_packet(0); + p->data = (guchar *)msn_slpmsgpart_serialize(part, &length); + p->length = length - P2P_PACKET_FOOTER_SIZE; /* DC doesn't need footer? */ p->sent_cb = msn_dc_send_packet_cb; p->part = msn_slpmsgpart_ref(part);