libpurple/protocols/msn/msg.c

branch
soc.2010.msn-tlc
changeset 31047
a6fad6ce0fbc
parent 31023
fbf4d4d3aaad
child 31048
c1c808ee9023
equal deleted inserted replaced
31046:33671e05cf24 31047:a6fad6ce0fbc
650 g_string_append(str, "\r\n"); 650 g_string_append(str, "\r\n");
651 } 651 }
652 else 652 else
653 { 653 {
654 int i; 654 int i;
655 for (i = 0; i < msg->body_len; i++) 655 int bin_len;
656
657 if (msg->part->footer->value == P2P_APPID_SESION)
658 bin_len = P2P_PACKET_HEADER_SIZE;
659 else
660 bin_len = body_len;
661
662 for (i = 0; i < bin_len; i++)
656 { 663 {
657 g_string_append_printf(str, "%.2hhX ", body[i]); 664 g_string_append_printf(str, "%.2hhX ", body[i]);
658 if ((i % 16) == 15) 665 if ((i % 16) == 15)
659 g_string_append(str, "\r\n"); 666 g_string_append(str, "\r\n");
660 } 667 }
668
669 if (bin_len == P2P_PACKET_HEADER_SIZE)
670 g_string_append_printf(str, "%s ", body + P2P_PACKET_HEADER_SIZE);
661 g_string_append(str, "\r\n"); 671 g_string_append(str, "\r\n");
662 } 672 }
663 } 673 }
664 674
665 g_string_append_printf(str, "Footer: %u\r\n", msg->part->footer->value); 675 g_string_append_printf(str, "Footer: 0x%08X\r\n", msg->part->footer->value);
666 } 676 }
667 else 677 else
668 { 678 {
669 if (body != NULL) 679 if (body != NULL)
670 { 680 {

mercurial