diff libpurple/protocols/qq/group_info.c @ 24144:a95c7e71064c

2008.10.05 - ccpaging <ccpagint(at)gmail.com> * Add my uid into buddy list * Fixed a minor bug in qq_create_buddy. Not get new buddy's info. * There are 38 fields in protocol 2008, one more than 2005/2007. * The packet of Modifing buddy info is changed. Need sample to fix it.
author SHiNE CsyFeK <csyfek@gmail.com>
date Wed, 22 Oct 2008 14:48:46 +0000
parents c2253c485728
children ec3f7d3e0445
line wrap: on
line diff
--- a/libpurple/protocols/qq/group_info.c	Wed Oct 22 14:47:39 2008 +0000
+++ b/libpurple/protocols/qq/group_info.c	Wed Oct 22 14:48:46 2008 +0000
@@ -157,7 +157,7 @@
 	qd = (qq_data *) gc->proto_data;
 
 	/* qq_show_packet("Room Info", data, data_len); */
-	
+
 	bytes = 0;
 	bytes += qq_get32(&id, data + bytes);
 	g_return_if_fail(id > 0);
@@ -197,10 +197,10 @@
 	}
 	/* qq_show_packet("Room Info", data + bytes, data_len - bytes); */
 	/* strlen + <str content> */
-	bytes += convert_as_pascal_string(data + bytes, &(group->title_utf8), QQ_CHARSET_DEFAULT);
+	bytes += qq_get_vstr(&(group->title_utf8), QQ_CHARSET_DEFAULT, data + bytes);
 	bytes += qq_get16(&unknown, data + bytes);	/* 0x0000 */
-	bytes += convert_as_pascal_string(data + bytes, &notice, QQ_CHARSET_DEFAULT);
-	bytes += convert_as_pascal_string(data + bytes, &(group->desc_utf8), QQ_CHARSET_DEFAULT);
+	bytes += qq_get_vstr(&notice, QQ_CHARSET_DEFAULT, data + bytes);
+	bytes += qq_get_vstr(&(group->desc_utf8), QQ_CHARSET_DEFAULT, data + bytes);
 
 	purple_debug_info("QQ", "room [%s] notice [%s] desc [%s] unknow 0x%04X\n",
 			group->title_utf8, notice, group->desc_utf8, unknown);
@@ -336,7 +336,7 @@
 		bytes += qq_get16(&(member->face), data + bytes);
 		bytes += qq_get8(&(member->age), data + bytes);
 		bytes += qq_get8(&(member->gender), data + bytes);
-		bytes += convert_as_pascal_string(data + bytes, &nick, QQ_CHARSET_DEFAULT);
+		bytes += qq_get_vstr(&nick, QQ_CHARSET_DEFAULT, data + bytes);
 		bytes += qq_get16(&unknown, data + bytes);
 		bytes += qq_get8(&(member->ext_flag), data + bytes);
 		bytes += qq_get8(&(member->comm_flag), data + bytes);