diff libpurple/protocols/qq/buddy_list.c @ 23606:bdb38a8bf721

20080717-05-1-fix-keep-alive ccpaging <ecc_hy(at)hotmail.com> * Fixed: Always lost connection. Now send keep alive packet in every 30 seconds * Minor fix for debug information * Filter \r\n and replace with SPCAE in group notive * Fixed a memory leak Tickets: Fixes #4024.
author SHiNE CsyFeK <csyfek@gmail.com>
date Thu, 17 Jul 2008 15:12:42 +0000
parents ebad75b719f5
children 1c50f12b1c52
line wrap: on
line diff
--- a/libpurple/protocols/qq/buddy_list.c	Thu Jul 17 05:26:47 2008 +0000
+++ b/libpurple/protocols/qq/buddy_list.c	Thu Jul 17 15:12:42 2008 +0000
@@ -234,12 +234,11 @@
 				"qq_process_get_buddies_online_reply: Dangerous error! maybe protocol changed, notify developers!\n");
 	}
 
-	if (position != QQ_FRIENDS_ONLINE_POSITION_END) {
-		purple_debug(PURPLE_DEBUG_INFO, "QQ", "Received %d online buddies, nextposition=%u\n",
-								count, (guint) position);
-		if (position != QQ_FRIENDS_ONLINE_POSITION_START) {
-			purple_debug(PURPLE_DEBUG_INFO, "QQ", "Requesting for more online buddies\n"); 
-		}
+	purple_debug(PURPLE_DEBUG_INFO, "QQ", "Received %d online buddies, nextposition=%u\n",
+							count, (guint) position);
+	if (position != QQ_FRIENDS_ONLINE_POSITION_END
+		  && position != QQ_FRIENDS_ONLINE_POSITION_START) {
+		purple_debug(PURPLE_DEBUG_INFO, "QQ", "Requesting for more online buddies\n"); 
 		qq_send_packet_get_buddies_online(gc, position);
 	} else {
 		purple_debug(PURPLE_DEBUG_INFO, "QQ", "All online buddies received\n"); 
@@ -318,8 +317,8 @@
 
 		if (QQ_DEBUG) {
 			purple_debug(PURPLE_DEBUG_INFO, "QQ",
-					"buddy [%09d]: flag1=0x%02x, comm_flag=0x%02x\n",
-					q_bud->uid, q_bud->flag1, q_bud->comm_flag);
+					"buddy [%09d]: flag1=0x%02x, comm_flag=0x%02x, nick=%s\n",
+					q_bud->uid, q_bud->flag1, q_bud->comm_flag, q_bud->nickname);
 		}
 
 		name = uid_to_purple_name(q_bud->uid);
@@ -432,7 +431,9 @@
 
 	purple_debug(PURPLE_DEBUG_INFO, "QQ", "Get all list done, %d buddies and %d Quns\n", i, j);
 	purple_debug(PURPLE_DEBUG_INFO, "QQ", "Received %d buddies and %d groups, nextposition=%u\n", i, j, (guint) position);
-	if (position != QQ_FRIENDS_ALL_LIST_POSITION_START && position != QQ_FRIENDS_ALL_LIST_POSITION_START) {
+
+	if (position != QQ_FRIENDS_ALL_LIST_POSITION_START
+		&& position != QQ_FRIENDS_ALL_LIST_POSITION_END) {
 		purple_debug(PURPLE_DEBUG_INFO, "QQ", "Requesting for more buddies and groups\n");
 		qq_send_packet_get_all_list_with_group(gc, position);
 	} else {