[PATCH] Fix QQ Qun display error
Coly Li
coyli at suse.de
Fri Jun 27 12:39:38 EDT 2008
Since pidgin 2.3.1, name of QQ Qun always gets displayed as (NULL). This patch fixes this error
against 2.4.1. This is a pretty yearning fix for QQ users, hope can be applied ASAP.
Signed-off-by: Coly Li <coyli at suse.de>
---
diff -ru pidgin-2.4.1-orig//libpurple/protocols/qq/char_conv.c
pidgin-2.4.1/libpurple/protocols/qq/char_conv.c
--- pidgin-2.4.1-orig//libpurple/protocols/qq/char_conv.c 2008-04-01 01:21:24.000000000 +0800
+++ pidgin-2.4.1/libpurple/protocols/qq/char_conv.c 2008-06-27 23:16:27.000000000 +0800
@@ -132,8 +132,8 @@
g_return_val_if_fail(data != NULL && from_charset != NULL, -1);
- len = data[0];
- *ret = _my_convert((gchar *) (data + 1), (gssize) len, UTF8, from_charset);
+ len = strlen(data);
+ *ret = _my_convert((gchar *) data, (gssize) len, UTF8, from_charset);
return len + 1;
}
diff -ru pidgin-2.4.1-orig//libpurple/protocols/qq/group_info.c
pidgin-2.4.1/libpurple/protocols/qq/group_info.c
--- pidgin-2.4.1-orig//libpurple/protocols/qq/group_info.c 2008-04-01 01:21:24.000000000 +0800
+++ pidgin-2.4.1/libpurple/protocols/qq/group_info.c 2008-06-27 23:15:46.000000000 +0800
@@ -170,6 +170,7 @@
GSList *pending_id;
gint pascal_len, i;
guint32 unknown4;
+ guint16 unknown2;
guint8 unknown1;
g_return_if_fail(data != NULL && len > 0);
@@ -198,7 +199,7 @@
read_packet_dw(data, cursor, len, &(group->group_category));
read_packet_w(data, cursor, len, &max_members);
read_packet_b(data, cursor, len, &unknown1);
- read_packet_dw(data, cursor, len, &(unknown4)); /* versionID */
+ read_packet_w(data, cursor, len, &(unknown2));
pascal_len = convert_as_pascal_string(*cursor, &(group->group_name_utf8), QQ_CHARSET_DEFAULT);
*cursor += pascal_len;
--
Coly Li
SuSE PRC Labs
More information about the Devel
mailing list