Mercurial > pidgin
changeset 24158:b6f09c1c79ce
2008.10.09 - ccpaging <ccpaging(at)gmail.com>
* 20081009-1
author | SHiNE CsyFeK <csyfek@gmail.com> |
---|---|
date | Tue, 28 Oct 2008 16:39:23 +0000 |
parents | 1ee91ff0d5fe |
children | 9be95f0b9472 |
files | libpurple/protocols/qq/ChangeLog libpurple/protocols/qq/char_conv.c libpurple/protocols/qq/group_im.c libpurple/protocols/qq/group_internal.c libpurple/protocols/qq/im.c |
diffstat | 5 files changed, 16 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/qq/ChangeLog Tue Oct 28 16:38:16 2008 +0000 +++ b/libpurple/protocols/qq/ChangeLog Tue Oct 28 16:39:23 2008 +0000 @@ -1,3 +1,6 @@ +2008.10.09 - ccpaging <ccpaging(at)gmail.com> + * 20081009-1 + 2008.10.09 - ccpaging <ccpaging(at)gmail.com> * Update 'group' protocol * Functions of group_find, group_free, group_search merged into group_join and group_internal
--- a/libpurple/protocols/qq/char_conv.c Tue Oct 28 16:38:16 2008 +0000 +++ b/libpurple/protocols/qq/char_conv.c Tue Oct 28 16:39:23 2008 +0000 @@ -157,9 +157,6 @@ /* checked qq_show_packet OK */ /* qq_show_packet("QQ_MESG recv for font style", data, len); */ - if (client_version >= 2007) { - bytes += 1; - } bytes += qq_get8(&font_attr, data + bytes); bytes += qq_getdata(color, 3, data + bytes); /* red,green,blue */ color_code = g_strdup_printf("#%02x%02x%02x", color[0], color[1], color[2]);
--- a/libpurple/protocols/qq/group_im.c Tue Oct 28 16:38:16 2008 +0000 +++ b/libpurple/protocols/qq/group_im.c Tue Oct 28 16:39:23 2008 +0000 @@ -445,16 +445,14 @@ gint font_attr_len; } packet; - g_return_if_fail(data != NULL && data_len > 0); /* FIXME: check length here */ qd = (qq_data *) gc->proto_data; -#if 1 - qq_show_packet("Room IM", data, data_len); -#endif + /* qq_show_packet("ROOM_IM", data, data_len); */ + memset(&packet, 0, sizeof(packet)); bytes = 0; bytes += qq_get32(&(packet.ext_id), data + bytes); @@ -481,7 +479,6 @@ bytes += qq_get16(&(packet.msg_len), data + bytes); g_return_if_fail(packet.msg_len > 0); - /* * 10 bytes from lumaqq * contentType = buf.getChar(); @@ -497,15 +494,19 @@ skip_len = 0; bytes += skip_len; + /* qq_show_packet("Message", data + bytes, data_len - bytes); */ + packet.msg = g_strdup((gchar *) data + bytes); bytes += strlen(packet.msg) + 1; /* there might not be any font_attr, check it */ - packet.font_attr_len = packet.msg_len - strlen(packet.msg) - 1 - skip_len; - if (packet.font_attr_len > 0) + packet.font_attr_len = data_len - bytes; + if (packet.font_attr_len > 0) { packet.font_attr = g_memdup(data + bytes, packet.font_attr_len); - else + qq_show_packet("font_attr", packet.font_attr, packet.font_attr_len); + } else { packet.font_attr = NULL; - + } + /* group im_group has no flag to indicate whether it has font_attr or not */ msg_with_purple_smiley = qq_smiley_to_purple(packet.msg); if (packet.font_attr_len > 0) {
--- a/libpurple/protocols/qq/group_internal.c Tue Oct 28 16:38:16 2008 +0000 +++ b/libpurple/protocols/qq/group_internal.c Tue Oct 28 16:39:23 2008 +0000 @@ -156,6 +156,7 @@ if (rmd == NULL) { rmd = room_data_new(id, ext_id, NULL); g_return_val_if_fail(rmd != NULL, NULL); + rmd->my_role = QQ_ROOM_ROLE_YES; qd->groups = g_list_append(qd->groups, rmd); }
--- a/libpurple/protocols/qq/im.c Tue Oct 28 16:38:16 2008 +0000 +++ b/libpurple/protocols/qq/im.c Tue Oct 28 16:39:23 2008 +0000 @@ -593,10 +593,10 @@ bytes += qq_putdata(raw_data + bytes, (guint8 *) msg_filtered, msg_len); send_im_tail = qq_get_send_im_tail(font_color, font_size, font_name, is_bold, is_italic, is_underline, tail_len); - qq_show_packet("QQ_send_im_tail debug", send_im_tail, tail_len); + /* qq_show_packet("qq_get_send_im_tail", send_im_tail, tail_len); */ bytes += qq_putdata(raw_data + bytes, send_im_tail, tail_len); - qq_show_packet("QQ_raw_data debug", raw_data, bytes); + /* qq_show_packet("QQ_CMD_SEND_IM, raw_data, bytes); */ if (bytes == raw_len) /* create packet OK */ qq_send_cmd(gc, QQ_CMD_SEND_IM, raw_data, bytes);