changeset 24156:147f1b17b6ce

2008.10.08 - ccpaging <ccpaging(at)gmail.com> * Update 'group' protocol
author SHiNE CsyFeK <csyfek@gmail.com>
date Tue, 28 Oct 2008 16:35:06 +0000
parents 3c52353b83ae
children 1ee91ff0d5fe
files libpurple/protocols/qq/ChangeLog libpurple/protocols/qq/buddy_info.c libpurple/protocols/qq/buddy_list.c
diffstat 3 files changed, 11 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/qq/ChangeLog	Tue Oct 28 16:29:42 2008 +0000
+++ b/libpurple/protocols/qq/ChangeLog	Tue Oct 28 16:35:06 2008 +0000
@@ -1,3 +1,6 @@
+2008.10.08 - ccpaging <ccpaging(at)gmail.com>
+	* Update 'group' protocol
+
 2008.10.08 - ccpaging <ccpaging(at)gmail.com>
 	* 20081008-1
 
--- a/libpurple/protocols/qq/buddy_info.c	Tue Oct 28 16:29:42 2008 +0000
+++ b/libpurple/protocols/qq/buddy_info.c	Tue Oct 28 16:35:06 2008 +0000
@@ -165,11 +165,11 @@
 				|| field_infos[index].type == QQ_FIELD_MULTI
 				|| index == QQ_INFO_GENDER)  {
 			utf8_str = qq_to_utf8(segments[index], QQ_CHARSET_DEFAULT);
-			purple_debug_info("QQ_BUDDY_INFO", "%s: %s\n", field_infos[index]. text, utf8_str);
+			purple_debug_info("QQ_BUDDY_INFO", "%s: %s\n", field_infos[index].text, utf8_str);
 			g_free(utf8_str);
 			continue;
 		}
-		purple_debug_info("QQ_BUDDY_INFO", "%s: %s\n", field_infos[index]. text, segments[index]);
+		purple_debug_info("QQ_BUDDY_INFO", "%s: %s\n", field_infos[index].text, segments[index]);
 	}
 }
 #endif
@@ -590,6 +590,8 @@
 	gchar *icon_file_content;
 	gsize icon_file_size;
 
+	g_return_if_fail(account != NULL && who != NULL);
+	
 	purple_debug_info("QQ", "Update %s icon to %d\n", who, face);
 
 	icon_name = qq_get_icon_name(face);
--- a/libpurple/protocols/qq/buddy_list.c	Tue Oct 28 16:29:42 2008 +0000
+++ b/libpurple/protocols/qq/buddy_list.c	Tue Oct 28 16:35:06 2008 +0000
@@ -252,7 +252,7 @@
 	}
 
 	purple_debug_info("QQ", "Received %d online buddies, nextposition=%u\n",
-							count, (guint) position);
+			count, (guint) position);
 	return position;
 }
 
@@ -357,7 +357,7 @@
 	guint8 sub_cmd, reply_code;
 	guint32 unknown, position;
 	guint32 uid;
-	guint8 type, groupid;
+	guint8 type;
 	qq_group *group;
 
 	g_return_val_if_fail(data != NULL && data_len != 0, -1);
@@ -383,12 +383,8 @@
 		bytes += qq_get32(&uid, data + bytes);
 		/* 04: type 0x1:buddy 0x4:Qun */
 		bytes += qq_get8(&type, data + bytes);
-		/* 05: groupid*4 */ /* seems to always be 0 */
-		bytes += qq_get8(&groupid, data + bytes);
-		/*
-		   purple_debug_info("QQ", "groupid: %i\n", groupid);
-		   groupid >>= 2;
-		   */
+		/* 05: skip unknow 0x00 */
+		bytes += 1;
 		if (uid == 0 || (type != 0x1 && type != 0x4)) {
 			purple_debug_info("QQ", "Buddy entry, uid=%d, type=%d", uid, type);
 			continue;