diff src/protocols/qq/buddy_list.c @ 13989:16102b9c5c4a

[gaim-migrate @ 16562] *Eliminated all Gtk-related code from the prpl. Notably, this included the group ("Qun") administrative dialog and a dialog for setting and viewing personal information. Code for the latter now uses the gaim UI, while the former is currently disabled. *Disabled a few non-functional/non-essential menu actions. These included: IP lookup, system logging, about dialog, and qq_buddy_menu. committer: Tailor Script <tailor@pidgin.im>
author Mark Huetsch <markhuetsch>
date Mon, 24 Jul 2006 13:39:12 +0000
parents 983fd420e86b
children ef8490f9e823
line wrap: on
line diff
--- a/src/protocols/qq/buddy_list.c	Mon Jul 24 09:25:48 2006 +0000
+++ b/src/protocols/qq/buddy_list.c	Mon Jul 24 13:39:12 2006 +0000
@@ -42,6 +42,8 @@
 #include "group_hash.h"         //qq_group_create_by_id
 #include "group_info.h"         //qq_send_cmd_group_get_group_info
 
+#include "qq_proxy.h"
+
 #define QQ_GET_ONLINE_BUDDY_02          0x02
 #define QQ_GET_ONLINE_BUDDY_03          0x03	// unknown function
 
@@ -56,13 +58,6 @@
 	guint8 ending;		//0x00
 } qq_friends_online_entry;
 
-//TODO: defined in qq_buddy_status.c, but only used here. Check decomposition.
-extern void			// defined in qq_buddy_status.c
- _qq_buddy_status_dump_unclear(qq_buddy_status * s);
-
-extern gint			// defined in qq_buddy_status.c
- _qq_buddy_status_read(guint8 * data, guint8 ** cursor, gint len, qq_buddy_status * s);
-
 /*****************************************************************************/
 // get a list of online_buddies
 void qq_send_packet_get_buddies_online(GaimConnection * gc, guint8 position)
@@ -148,7 +143,7 @@
 
 	g_return_if_fail(fe != NULL);
 
-	_qq_buddy_status_dump_unclear(fe->s);
+	qq_buddy_status_dump_unclear(fe->s);
 
 	dump = g_string_new("");
 	g_string_append_printf(dump, "unclear fields for [%d]:\n", fe->s->uid);
@@ -180,9 +175,14 @@
 	data = g_newa(guint8, len);
 	cursor = data;
 
+	gaim_debug(GAIM_DEBUG_INFO, "QQ", "processing get_buddies_online_reply\n");
+	
 	if (qq_crypt(DECRYPT, buf, buf_len, qd->session_key, data, &len)) {
 
+		_qq_show_packet("Get buddies online reply packet", data, len);
+
 		read_packet_b(data, &cursor, len, &position);
+
 		fe = g_newa(qq_friends_online_entry, 1);
 		fe->s = g_newa(qq_buddy_status, 1);
 
@@ -190,7 +190,7 @@
 			// based on one online buddy entry
 			bytes = 0;
 			// 000-030 qq_buddy_status
-			bytes += _qq_buddy_status_read(data, &cursor, len, fe->s);
+			bytes += qq_buddy_status_read(data, &cursor, len, fe->s);
 			// 031-032: unknown4
 			bytes += read_packet_w(data, &cursor, len, &fe->unknown1);
 			// 033-033: flag1
@@ -209,8 +209,8 @@
 				continue;
 			}	// check if it is a valid entry
 
-//			if (QQ_DEBUG)
-//				_qq_buddies_online_reply_dump_unclear(fe);
+			if (QQ_DEBUG)
+				_qq_buddies_online_reply_dump_unclear(fe);
 
 			// update buddy information
 			b = gaim_find_buddy(gaim_connection_get_account(gc), uid_to_gaim_name(fe->s->uid));
@@ -219,10 +219,10 @@
 			if (q_bud != NULL) {	// we find one and update qq_buddy
 				if(0 != fe->s->client_version)
 					q_bud->client_version = fe->s->client_version; //by gfhuang
-				if(0 != *((guint32 *)fe->s->ip)) { // by gfhuang
+			//	if(0 != *((guint32 *)fe->s->ip)) { // by gfhuang
 					g_memmove(q_bud->ip, fe->s->ip, 4);
 					q_bud->port = fe->s->port;
-				}
+		//		}
 				q_bud->status = fe->s->status;
 				q_bud->flag1 = fe->flag1;
 				q_bud->comm_flag = fe->comm_flag;