Mercurial > pidgin
comparison libpurple/protocols/msn/slpmsg_part.c @ 30843:98cd0ea847ec
Properly set the body_len of the SlpMessagePart, this set correctly the footer value.
author | masca@cpw.pidgin.im |
---|---|
date | Mon, 05 Jul 2010 21:35:46 +0000 |
parents | df3e9c686b02 |
children | 74c4aa38adfc |
comparison
equal
deleted
inserted
replaced
30842:e2f1c3184302 | 30843:98cd0ea847ec |
---|---|
37 /* Extract the binary SLP header */ | 37 /* Extract the binary SLP header */ |
38 part->header = msn_p2p_header_from_wire((MsnP2PHeader*)tmp); | 38 part->header = msn_p2p_header_from_wire((MsnP2PHeader*)tmp); |
39 tmp += P2P_PACKET_HEADER_SIZE; | 39 tmp += P2P_PACKET_HEADER_SIZE; |
40 | 40 |
41 /* Extract the body */ | 41 /* Extract the body */ |
42 body_len = data_len - (tmp - data); | 42 body_len = data_len - P2P_PACKET_HEADER_SIZE - P2P_PACKET_FOOTER_SIZE; |
43 /* msg->body_len = msg->msnslp_header.length; */ | 43 /* msg->body_len = msg->msnslp_header.length; */ |
44 | 44 |
45 if (body_len > 0) { | 45 if (body_len > 0) { |
46 part->size = body_len; | 46 part->size = body_len; |
47 part->buffer = g_malloc(body_len); | 47 part->buffer = g_malloc(body_len); |