# HG changeset patch # User masca@cpw.pidgin.im # Date 1276726327 0 # Node ID fd8abea40a0d075371d26a96bd87488a62cfa01f # Parent e6447e4062da1c6d625285c0305cc34732201c51 Migrate MsnMessage code to use Parts instead of the whole SlpMessage. diff -r e6447e4062da -r fd8abea40a0d libpurple/protocols/msn/msg.c --- a/libpurple/protocols/msn/msg.c Wed Jun 16 21:55:23 2010 +0000 +++ b/libpurple/protocols/msn/msg.c Wed Jun 16 22:12:07 2010 +0000 @@ -259,7 +259,7 @@ if (content_type != NULL && !strcmp(content_type, "application/x-msnmsgrp2p")) { msg->msnslp_message = TRUE; - msg->slpmsg = msn_slpmsg_new_from_data(tmp, payload_len - (tmp - tmp_base)); + msg->part = msn_slpmsgpart_new_from_data(tmp, payload_len - (tmp - tmp_base)); } if (payload_len - (tmp - tmp_base) > 0) { @@ -303,7 +303,7 @@ { char *tmp; - tmp = msn_slpmsg_serialize(msg->slpmsg, ret_size); + tmp = msn_slpmsgpart_serialize(msg->part, ret_size); return tmp; } @@ -362,7 +362,7 @@ size_t siz; char *body; - body = msn_slpmsg_serialize(msg->slpmsg, &siz); + body = msn_slpmsgpart_serialize(msg->part, &siz); memcpy(n, body, siz); n += siz; @@ -625,15 +625,15 @@ if (msg->msnslp_message) { - g_string_append_printf(str, "Session ID: %u\r\n", msg->slpmsg->header->session_id); - g_string_append_printf(str, "ID: %u\r\n", msg->slpmsg->header->id); - g_string_append_printf(str, "Offset: %" G_GUINT64_FORMAT "\r\n", msg->slpmsg->header->offset); - g_string_append_printf(str, "Total size: %" G_GUINT64_FORMAT "\r\n", msg->slpmsg->header->total_size); - g_string_append_printf(str, "Length: %u\r\n", msg->slpmsg->header->length); - g_string_append_printf(str, "Flags: 0x%x\r\n", msg->slpmsg->header->flags); - g_string_append_printf(str, "ACK ID: %u\r\n", msg->slpmsg->header->ack_id); - g_string_append_printf(str, "SUB ID: %u\r\n", msg->slpmsg->header->ack_sub_id); - g_string_append_printf(str, "ACK Size: %" G_GUINT64_FORMAT "\r\n", msg->slpmsg->header->ack_size); + g_string_append_printf(str, "Session ID: %u\r\n", msg->part->header->session_id); + g_string_append_printf(str, "ID: %u\r\n", msg->part->header->id); + g_string_append_printf(str, "Offset: %" G_GUINT64_FORMAT "\r\n", msg->part->header->offset); + g_string_append_printf(str, "Total size: %" G_GUINT64_FORMAT "\r\n", msg->part->header->total_size); + g_string_append_printf(str, "Length: %u\r\n", msg->part->header->length); + g_string_append_printf(str, "Flags: 0x%x\r\n", msg->part->header->flags); + g_string_append_printf(str, "ACK ID: %u\r\n", msg->part->header->ack_id); + g_string_append_printf(str, "SUB ID: %u\r\n", msg->part->header->ack_sub_id); + g_string_append_printf(str, "ACK Size: %" G_GUINT64_FORMAT "\r\n", msg->part->header->ack_size); if (purple_debug_is_verbose() && body != NULL) { @@ -660,7 +660,7 @@ } } - g_string_append_printf(str, "Footer: %u\r\n", msg->slpmsg->footer->value); + g_string_append_printf(str, "Footer: %u\r\n", msg->part->footer->value); } else {