pidgin: e0d4adfc: disapproval of revision '92d52eef2994d26...

datallah at pidgin.im datallah at pidgin.im
Sun Sep 14 23:22:30 EDT 2008


-----------------------------------------------------------------
Revision: e0d4adfcd908978bcad627bd8212730ce8775292
Ancestor: 92d52eef2994d2697999177804e3665989cfa352
Author: datallah at pidgin.im
Date: 2008-09-15T03:03:59
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/e0d4adfcd908978bcad627bd8212730ce8775292

Modified files:
        libpurple/protocols/qq/buddy_info.c
        libpurple/protocols/qq/buddy_info.h
        libpurple/protocols/qq/buddy_list.c
        libpurple/protocols/qq/group_im.c
        libpurple/protocols/qq/group_info.c
        libpurple/protocols/qq/group_join.c
        libpurple/protocols/qq/group_join.h
        libpurple/protocols/qq/group_opt.c
        libpurple/protocols/qq/group_search.c
        libpurple/protocols/qq/header_info.c
        libpurple/protocols/qq/header_info.h
        libpurple/protocols/qq/im.c libpurple/protocols/qq/qq.c
        libpurple/protocols/qq/qq.h
        libpurple/protocols/qq/qq_network.c
        libpurple/protocols/qq/qq_process.c
        libpurple/protocols/qq/qq_process.h
        libpurple/protocols/qq/qq_trans.c
        libpurple/protocols/qq/qq_trans.h
        libpurple/protocols/qq/sys_msg.c

ChangeLog: 

disapproval of revision '92d52eef2994d2697999177804e3665989cfa352'
-------------- next part --------------
============================================================
--- libpurple/protocols/qq/buddy_info.c	21a8fb76d13a413d6e5a4a14cc8c48d963520c7b
+++ libpurple/protocols/qq/buddy_info.c	8692742a441f53367bb7b6f606d7b59a74ecb2bc
@@ -284,7 +284,7 @@ void qq_send_packet_get_info(PurpleConne
 
 	qd = (qq_data *) gc->proto_data;
 	g_snprintf(uid_str, sizeof(uid_str), "%d", uid);
-	qq_send_cmd(gc, QQ_CMD_GET_BUDDY_INFO, (guint8 *) uid_str, strlen(uid_str));
+	qq_send_cmd(gc, QQ_CMD_GET_USER_INFO, (guint8 *) uid_str, strlen(uid_str));
 
 	query = g_new0(qq_info_query, 1);
 	query->uid = uid;
@@ -303,7 +303,7 @@ void qq_request_buddy_info(PurpleConnect
 
 	qd = (qq_data *) gc->proto_data;
 	g_snprintf(raw_data, sizeof(raw_data), "%d", uid);
-	qq_send_cmd_mess(gc, QQ_CMD_GET_BUDDY_INFO, (guint8 *) raw_data, strlen(raw_data),
+	qq_send_cmd_mess(gc, QQ_CMD_GET_USER_INFO, (guint8 *) raw_data, strlen(raw_data),
 			update_class, ship32);
 }
 
@@ -690,9 +690,9 @@ static void create_modify_info_dialogue(
 		mid->info->qq_show = g_strdup(info->qq_show);
 		mid->info->unknown6 = g_strdup(info->unknown6);
 
-		purple_request_fields(gc, _("Modify information"),
-				_("Modify information"), NULL, fields,
-				_("Update information"), G_CALLBACK(modify_info_ok_cb),
+		purple_request_fields(gc, _("Modify my information"),
+				_("Modify my information"), NULL, fields,
+				_("Update my information"), G_CALLBACK(modify_info_ok_cb),
 				_("Cancel"), G_CALLBACK(modify_info_cancel_cb),
 				purple_connection_get_account(gc), NULL, NULL,
 				mid);
@@ -759,8 +759,8 @@ void qq_set_my_buddy_icon(PurpleConnecti
 	const gchar *buddy_icon_dir = qq_buddy_icon_dir();
 	gint prefix_len = strlen(QQ_ICON_PREFIX);
 	gint suffix_len = strlen(QQ_ICON_SUFFIX);
-	gint dir_len = buddy_icon_dir ? strlen(buddy_icon_dir) : 0;
-	gchar *errmsg = g_strdup_printf(_("Setting custom faces is not currently supported. Please choose an image from %s."), buddy_icon_dir ? buddy_icon_dir : "(null)");
+	gint dir_len = strlen(buddy_icon_dir);
+	gchar *errmsg = g_strdup_printf(_("Setting custom faces is not currently supported. Please choose an image from %s."), buddy_icon_dir);
 	gboolean icon_global = purple_account_get_bool(gc->account, "use-global-buddyicon", TRUE);
 
 	if (!icon_path)
@@ -769,7 +769,7 @@ void qq_set_my_buddy_icon(PurpleConnecti
 	icon_len = strlen(icon_path) - dir_len - 1 - prefix_len - suffix_len;
 
 	/* make sure we're using an appropriate icon */
-	if (buddy_icon_dir && !(g_ascii_strncasecmp(icon_path, buddy_icon_dir, dir_len) == 0
+	if (!(g_ascii_strncasecmp(icon_path, buddy_icon_dir, dir_len) == 0
 				&& icon_path[dir_len] == G_DIR_SEPARATOR
 				&& g_ascii_strncasecmp(icon_path + dir_len + 1, QQ_ICON_PREFIX, prefix_len) == 0
 				&& g_ascii_strncasecmp(icon_path + dir_len + 1 + prefix_len + icon_len, QQ_ICON_SUFFIX, suffix_len) == 0
@@ -811,8 +811,8 @@ static void _qq_update_buddy_icon(Purple
 	if ((buddy = purple_find_buddy(account, name)))
 		old_icon_num = purple_buddy_icons_get_checksum_for_user(buddy);
 
-	if ((old_icon_num == NULL ||
-			strcmp(icon_num_str, old_icon_num)) && (qq_buddy_icon_dir() != NULL))
+	if (old_icon_num == NULL ||
+			strcmp(icon_num_str, old_icon_num))
 	{
 		gchar *icon_path;
 
@@ -862,7 +862,7 @@ static void qq_refresh_buddy_and_myself(
 }
 
 /* process reply to get_info packet */
-void qq_process_get_buddy_info(guint8 *data, gint data_len, PurpleConnection *gc)
+void qq_process_get_info_reply(guint8 *data, gint data_len, PurpleConnection *gc)
 {
 	gchar **segments;
 	qq_info_query *query;
@@ -932,7 +932,7 @@ void qq_info_query_free(qq_data *qd)
 	}
 }
 
-void qq_request_get_level(PurpleConnection *gc, guint32 uid)
+void qq_send_packet_get_level(PurpleConnection *gc, guint32 uid)
 {
 	qq_data *qd = (qq_data *) gc->proto_data;
 	guint8 buf[16] = {0};
@@ -945,7 +945,7 @@ void qq_request_get_level(PurpleConnecti
 	qq_send_cmd(gc, QQ_CMD_GET_LEVEL, buf, bytes);
 }
 
-void qq_request_get_buddies_level(PurpleConnection *gc, gint update_class)
+void qq_request_get_buddies_levels(PurpleConnection *gc, gint update_class)
 {
 	guint8 *buf;
 	guint16 size;
============================================================
--- libpurple/protocols/qq/buddy_info.h	1ac122f76dd136bbcd3cb7fb68e90d547f0b0a69
+++ libpurple/protocols/qq/buddy_info.h	1788934386864124acf1163392f41bea2c5eaad9
@@ -80,9 +80,9 @@ void qq_process_modify_info_reply(guint8
 void qq_set_buddy_icon_for_user(PurpleAccount *account, const gchar *who, const gchar *icon_num, const gchar *iconfile);
 void qq_prepare_modify_info(PurpleConnection *gc);
 void qq_process_modify_info_reply(guint8 *data, gint data_len, PurpleConnection *gc);
-void qq_process_get_buddy_info(guint8 *data, gint data_len, PurpleConnection *gc);
+void qq_process_get_info_reply(guint8 *data, gint data_len, PurpleConnection *gc);
 void qq_info_query_free(qq_data *qd);
-void qq_request_get_level(PurpleConnection *gc, guint32 uid);
-void qq_request_get_buddies_level(PurpleConnection *gc, gint update_class);
+void qq_send_packet_get_level(PurpleConnection *gc, guint32 uid);
+void qq_request_get_buddies_levels(PurpleConnection *gc, gint update_class);
 void qq_process_get_level_reply(guint8 *buf, gint buf_len, PurpleConnection *gc);
 #endif
============================================================
--- libpurple/protocols/qq/buddy_list.c	2c42bc762d46d47c658d37ab67f513174b2e6d8a
+++ libpurple/protocols/qq/buddy_list.c	902dfa24074b09d996a0a2d4ff89b38c00d3e947
@@ -569,7 +569,7 @@ void qq_process_buddy_change_status(guin
 	q_bud->status =bs.status;
 
 	if (q_bud->status == QQ_BUDDY_ONLINE_NORMAL) {
-		qq_request_get_level(gc, q_bud->uid);
+		qq_send_packet_get_level(gc, q_bud->uid);
 	}
 	qq_update_buddy_contact(gc, q_bud);
 }
============================================================
--- libpurple/protocols/qq/group_im.c	160d70eeb94547c11031f71d2629ad0e4f885c4c
+++ libpurple/protocols/qq/group_im.c	c46e53482e9fb4ee95c0a19023b3b85e3bd2fe06
@@ -120,7 +120,7 @@ void qq_process_room_msg_apply_join(guin
 
 	bytes += convert_as_pascal_string(data + bytes, &reason_utf8, QQ_CHARSET_DEFAULT);
 
-	msg = g_strdup_printf(_("%d request to join Qun %d"), user_uid, ext_id);
+	msg = g_strdup_printf(_("%d requested to join Qun %d"), user_uid, ext_id);
 	reason = g_strdup_printf(_("Message: %s"), reason_utf8);
 
 	g = g_new0(group_member_opt, 1);
@@ -171,7 +171,7 @@ void qq_process_room_msg_been_rejected(g
 	bytes += convert_as_pascal_string(data + bytes, &reason_utf8, QQ_CHARSET_DEFAULT);
 
 	msg = g_strdup_printf
-		(_("Failed to join Qun %d, operated by admin %d"), ext_id, admin_uid);
+		(_("Your request to join Qun %d has been rejected by admin %d"), ext_id, admin_uid);
 	reason = g_strdup_printf(_("Message: %s"), reason_utf8);
 
 	purple_notify_warning(gc, _("QQ Qun Operation"), msg, reason);
@@ -209,7 +209,7 @@ void qq_process_room_msg_been_approved(g
 	bytes += convert_as_pascal_string(data + bytes, &reason_utf8, QQ_CHARSET_DEFAULT);
 
 	msg = g_strdup_printf
-		(_("Successed to join Qun %d, operated by admin %d"), ext_id, admin_uid);
+		(_("Your request to join Qun %d has been approved by admin %d"), ext_id, admin_uid);
 
 	purple_notify_warning(gc, _("QQ Qun Operation"), msg, NULL);
 
@@ -284,7 +284,7 @@ void qq_process_room_msg_been_added(guin
 		group = qq_group_create_internal_record(gc, id, ext_id, NULL);
 		group->my_role = QQ_ROOM_ROLE_YES;
 		qq_group_refresh(gc, group);
-		qq_update_room(gc, 0, group->id);
+		qq_room_update(gc, 0, group->id);
 		/* the return of this cmd will automatically update the group in blist */
 	}
 
@@ -380,8 +380,7 @@ void qq_process_room_msg_normal(guint8 *
 	conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_CHAT, group->title_utf8, purple_connection_get_account(gc));
 	if (conv == NULL && purple_prefs_get_bool("/plugins/prpl/qq/prompt_group_msg_on_recv")) {
 		/* New conv should open, get group info*/
-		/* qq_update_room(gc, 0, group->id); */
-		qq_send_room_cmd_only(gc, QQ_ROOM_CMD_GET_ONLINES, group->id);
+		qq_room_update(gc, 0, group->id);
 
 		serv_got_joined_chat(gc, qd->channel++, group->title_utf8);
 		conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_CHAT, group->title_utf8, purple_connection_get_account(gc));
============================================================
--- libpurple/protocols/qq/group_info.c	c2aadb3731af51c68cf62fce08486b38eefab05c
+++ libpurple/protocols/qq/group_info.c	3ea1d5d410f6718065865401f2ced4e7a05302bb
@@ -154,13 +154,13 @@ void qq_process_room_cmd_get_info(guint8
 
 	/* strlen + <str content> */
 	bytes += convert_as_pascal_string(data + bytes, &(group->title_utf8), QQ_CHARSET_DEFAULT);
+	purple_debug_info("QQ", "group \"%s\"\n", group->title_utf8);
 	bytes += qq_get16(&unknown, data + bytes);	/* 0x0000 */
 	bytes += convert_as_pascal_string(data + bytes, &notice, QQ_CHARSET_DEFAULT);
+	purple_debug_info("QQ", "notice \"%s\"\n", notice);
 	bytes += convert_as_pascal_string(data + bytes, &(group->desc_utf8), QQ_CHARSET_DEFAULT);
+	purple_debug_info("QQ", "group_desc \"%s\"\n", group->desc_utf8);
 
-	purple_debug_info("QQ", "room [%s] notice [%s] desc [%s] unknow 0x%04X\n",
-			group->title_utf8, notice, group->desc_utf8, unknown);
-
 	num = 0;
 	/* now comes the member list separated by 0x00 */
 	while (bytes < data_len) {
============================================================
--- libpurple/protocols/qq/group_join.c	fda848e18f3fa79d3afea08809fc50dfce316c3c
+++ libpurple/protocols/qq/group_join.c	b67c1322991d3e6f1861628109c608deb68af6cf
@@ -65,7 +65,7 @@ static void _qq_group_exit_with_gc_and_i
 }
 
 /* send packet to join a group without auth */
-void qq_request_room_join(PurpleConnection *gc, qq_group *group)
+void qq_send_cmd_group_join_group(PurpleConnection *gc, qq_group *group)
 {
 	g_return_if_fail(group != NULL);
 
@@ -79,12 +79,8 @@ void qq_request_room_join(PurpleConnecti
 	case QQ_ROOM_AUTH_TYPE_NEED_AUTH:
 		break;
 	case QQ_ROOM_AUTH_TYPE_NO_ADD:
-		if (group->my_role == QQ_ROOM_ROLE_NO
-				&& group->my_role == QQ_ROOM_ROLE_REQUESTING) {
-			purple_notify_warning(gc, NULL, _("The Qun does not allow others to join"), NULL);
-			return;
-		}
-		break;
+		purple_notify_warning(gc, NULL, _("The Qun does not allow others to join"), NULL);
+		return;
 	default:
 		purple_debug_error("QQ", "Unknown room auth type: %d\n", group->auth_type);
 		break;
@@ -249,8 +245,7 @@ void qq_process_group_cmd_join_group(gui
 		qq_group_refresh(gc, group);
 		/* this must be shown before getting online members */
 		qq_group_conv_show_window(gc, group);
-		/* qq_update_room(gc, 0, group->id); */
-		qq_send_room_cmd_only(gc, QQ_ROOM_CMD_GET_ONLINES, group->id);
+		qq_room_update(gc, 0, group->id);
 		break;
 	case QQ_ROOM_JOIN_NEED_AUTH:
 		purple_debug_info("QQ",
@@ -290,7 +285,7 @@ void qq_group_join(PurpleConnection *gc,
 
 	group = qq_room_search_ext_id(gc, ext_id);
 	if (group) {
-		qq_request_room_join(gc, group);
+		qq_send_cmd_group_join_group(gc, group);
 	} else {
 		qq_set_pending_id(&qd->joining_groups, ext_id, TRUE);
 		qq_send_cmd_group_search_group(gc, ext_id);
============================================================
--- libpurple/protocols/qq/group_join.h	3b40893ee013641ea28952bcd577f6ec6c062453
+++ libpurple/protocols/qq/group_join.h	df3dae6e6bdfd0a3c12aaf50f0c33e8e66c87ac7
@@ -43,7 +43,7 @@ void qq_group_join(PurpleConnection *gc,
 
 void qq_send_cmd_group_auth(PurpleConnection *gc, qq_group *group, guint8 opt, guint32 uid, const gchar *reason_utf8);
 void qq_group_join(PurpleConnection *gc, GHashTable *data);
-void qq_request_room_join(PurpleConnection *gc, qq_group *group);
+void qq_send_cmd_group_join_group(PurpleConnection *gc, qq_group *group);
 void qq_group_exit(PurpleConnection *gc, GHashTable *data);
 void qq_process_group_cmd_exit_group(guint8 *data, gint len, PurpleConnection *gc);
 void qq_process_group_cmd_join_group_auth(guint8 *data, gint len, PurpleConnection *gc);
============================================================
--- libpurple/protocols/qq/group_opt.c	d0a890f4b55be71315c0a7756e4c286d7912f615
+++ libpurple/protocols/qq/group_opt.c	98dd986059a93ab53d153d458a1f9185e335ab2d
@@ -359,7 +359,7 @@ void qq_group_process_create_group_reply
 	qq_group_refresh(gc, group);
 
 	qq_send_room_cmd_only(gc, QQ_ROOM_CMD_ACTIVATE, id);
-	qq_update_room(gc, 0, group->id);
+	qq_room_update(gc, 0, group->id);
 
 	purple_debug_info("QQ", "Succeed in create Qun, external ID %d\n", group->ext_id);
 
============================================================
--- libpurple/protocols/qq/group_search.c	3ab74d8fa384063407170325c69f1f61e2021511
+++ libpurple/protocols/qq/group_search.c	07127dd246f2fbd0032f25f9b06f5abe91ec17f7
@@ -116,7 +116,7 @@ void qq_process_group_cmd_search_group(g
 	bytes += convert_as_pascal_string(data + bytes, &(group.desc_utf8), QQ_CHARSET_DEFAULT);
 	/* end of one qq_group */
 	if(bytes != len) {
-		purple_debug_error("QQ",
+		purple_debug_error("QQ", 
 			"group_cmd_search_group: Dangerous error! maybe protocol changed, notify developers!");
 	}
 
@@ -124,9 +124,9 @@ void qq_process_group_cmd_search_group(g
 	if (pending_id != NULL) {
 		qq_set_pending_id(&qd->joining_groups, group.ext_id, FALSE);
 		if (qq_room_search_id(gc, group.id) == NULL)
-			qq_group_create_internal_record(gc,
+			qq_group_create_internal_record(gc, 
 					group.id, group.ext_id, group.title_utf8);
-		qq_request_room_join(gc, &group);
+		qq_send_cmd_group_join_group(gc, &group);
 	} else {
 		_qq_setup_roomlist(qd, &group);
 	}
============================================================
--- libpurple/protocols/qq/header_info.c	fdaaac088f6dcef16a7b21f53805cf9cd3c1dafd
+++ libpurple/protocols/qq/header_info.c	f6c8d5882aa98e81f4f08d75d9e6f09d1e244bf9
@@ -138,8 +138,8 @@ const gchar *qq_get_cmd_desc(gint cmd)
 		return "QQ_CMD_UPDATE_INFO";
 	case QQ_CMD_SEARCH_USER:
 		return "QQ_CMD_SEARCH_USER";
-	case QQ_CMD_GET_BUDDY_INFO:
-		return "QQ_CMD_GET_BUDDY_INFO";
+	case QQ_CMD_GET_USER_INFO:
+		return "QQ_CMD_GET_USER_INFO";
 	case QQ_CMD_ADD_BUDDY_WO_AUTH:
 		return "QQ_CMD_ADD_BUDDY_WO_AUTH";
 	case QQ_CMD_DEL_BUDDY:
============================================================
--- libpurple/protocols/qq/header_info.h	2291a5a989742f72bf23e068817c4c67d4d00c7a
+++ libpurple/protocols/qq/header_info.h	1fb677b46ef167f921799cfd63a850c36e429cc8
@@ -43,7 +43,7 @@ enum {
 	QQ_CMD_KEEP_ALIVE = 0x0002,			/* get onlines from tencent */
 	QQ_CMD_UPDATE_INFO = 0x0004,			/* update information */
 	QQ_CMD_SEARCH_USER = 0x0005,			/* search for user */
-	QQ_CMD_GET_BUDDY_INFO = 0x0006,			/* get user information */
+	QQ_CMD_GET_USER_INFO = 0x0006,			/* get user information */
 	QQ_CMD_ADD_BUDDY_WO_AUTH = 0x0009,		/* add buddy without auth */
 	QQ_CMD_DEL_BUDDY = 0x000a,			/* delete a buddy  */
 	QQ_CMD_BUDDY_AUTH = 0x000b,			/* buddy authentication */
============================================================
--- libpurple/protocols/qq/im.c	672b756896f16bdc04d0fcd9929a95fa29a6f173
+++ libpurple/protocols/qq/im.c	5d3ec6ec0446db7b0d31d8c2613a1bcd42820909
@@ -259,7 +259,7 @@ static void _qq_process_recv_news(guint8
 #endif
 
 	temp = g_newa(guint8, data_len);
-	bytes = 4;	/* ignore unknown 4 bytes */
+	bytes = 4;	// ignore unknown 4 bytes
 
 	bytes += qq_get8(&temp_len, data + bytes);
 	g_return_if_fail(bytes + temp_len <= data_len);
============================================================
--- libpurple/protocols/qq/qq.c	21db9ee57d7b0fda59a9fad291ba6578d45f4956
+++ libpurple/protocols/qq/qq.c	5a34bedb1748ea86e3abef9336083ad12ffa53e7
@@ -97,7 +97,10 @@ static void server_list_create(PurpleAcc
 
 	gpi = purple_proxy_get_setup(account);
 
-	qd->use_tcp = purple_account_get_bool(account, "use_tcp", TRUE);
+	qd->use_tcp  = TRUE;
+	if (purple_proxy_info_get_type(gpi) == PURPLE_PROXY_UDP) {
+		qd->use_tcp  = FALSE;
+	}
 
 	user_server = purple_account_get_string(account, "server", NULL);
 	purple_debug_info("QQ", "Select server '%s'\n", user_server);
@@ -465,7 +468,7 @@ static void _qq_get_info(PurpleConnectio
 		return;
 	}
 
-	qq_request_get_level(gc, uid);
+	qq_send_packet_get_level(gc, uid);
 	qq_send_packet_get_info(gc, uid, TRUE);
 }
 
@@ -842,11 +845,15 @@ static void init_plugin(PurplePlugin *pl
 		entry = entry->next;
 	}
 
-	option = purple_account_option_list_new(_("Server"), "server", kvlist);
+	/*
+	option = purple_account_option_string_new(_("Server"), "server", NULL);
 	prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option);
 
-	option = purple_account_option_bool_new(_("Connect by TCP"), "use_tcp", TRUE);
+	option = purple_account_option_int_new(_("Port"), "port", 0);
 	prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option);
+	*/
+	option = purple_account_option_list_new(_("Server"), "server", kvlist);
+	prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option);
 
 	option = purple_account_option_bool_new(_("Show server notice"), "show_notice", TRUE);
 	prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option);
============================================================
--- libpurple/protocols/qq/qq.h	744eff96c4a552453b9054ce00bc80d710d77d7c
+++ libpurple/protocols/qq/qq.h	b59cc95c61437ae001fd4611c1bbca9f33edca83
@@ -48,7 +48,7 @@ struct _qq_interval {
 struct _qq_interval {
 	gint resend;
 	gint keep_alive;
-	gint update;
+	gint update; 
 };
 
 struct _qq_buddy {
@@ -91,15 +91,11 @@ struct _qq_data {
 	GSList *openconns;
 	gboolean use_tcp;		/* network in tcp or udp */
 	PurpleProxyConnectData *conn_data;
-#ifndef purple_proxy_connect_udp
-	PurpleDnsQueryData *udp_query_data;		/* udp related */
-	gint udp_can_write_handler; 	/* socket can_write handle, use in udp connecting and tcp send out */
-#endif
 	gint fd;							/* socket file handler */
 
 	GList *servers;
 	gchar *curr_server;		/* point to servers->data, do not free*/
-
+	
 	struct in_addr redirect_ip;
 	guint16 redirect_port;
 	guint check_watcher;
@@ -109,7 +105,7 @@ struct _qq_data {
 	qq_interval itv_config;
 	qq_interval itv_count;
 	guint network_watcher;
-
+	
 	GList *transactions;	/* check ack packet and resend */
 
 	guint32 uid;			/* QQ number */
@@ -123,6 +119,7 @@ struct _qq_data {
 	guint16 send_seq;		/* send sequence number */
 	guint8 login_mode;		/* online of invisible */
 	gboolean is_login;		/* used by qq-add_buddy */
+	gboolean is_finish_update;
 
 	PurpleXfer *xfer;			/* file transfer handler */
 
============================================================
--- libpurple/protocols/qq/qq_network.c	99f144dee6ce88d141acb4a404ae939b52abb533
+++ libpurple/protocols/qq/qq_network.c	3853b123926421d8dd7a315c551b2c20c3bcf71c
@@ -234,6 +234,8 @@ static gboolean packet_process(PurpleCon
 	qq_data *qd;
 	gint bytes, bytes_not_read;
 
+	gboolean prev_update_status;
+
 	guint8 header_tag;
 	guint16 source_tag;
 	guint16 cmd;
@@ -254,8 +256,8 @@ static gboolean packet_process(PurpleCon
 	bytes += packet_get_header(&header_tag, &source_tag, &cmd, &seq, buf + bytes);
 
 #if 1
-		purple_debug_info("QQ", "==> [%05d] %s 0x%04X, source tag 0x%04X len %d\n",
-				seq, qq_get_cmd_desc(cmd), cmd, source_tag, buf_len);
+		purple_debug_info("QQ", "==> [%05d] 0x%04X %s, source tag 0x%04X len %d\n",
+				seq, cmd, qq_get_cmd_desc(cmd), source_tag, buf_len);
 #endif
 	/* this is the length of all the encrypted data (also remove tail tag) */
 	bytes_not_read = buf_len - bytes - 1;
@@ -265,11 +267,9 @@ static gboolean packet_process(PurpleCon
 	trans = qq_trans_find_rcved(gc, cmd, seq);
 	if (trans == NULL) {
 		/* new server command */
-		if ( !qd->is_login ) {
-			qq_trans_add_remain(gc, cmd, seq, buf + bytes, bytes_not_read);
-		} else {
-			qq_trans_add_server_cmd(gc, cmd, seq, buf + bytes, bytes_not_read);
-			qq_proc_server_cmd(gc, cmd, seq, buf + bytes, bytes_not_read);
+		qq_trans_add_server_cmd(gc, cmd, seq, buf + bytes, bytes_not_read);
+		if ( qd->is_finish_update ) {
+			qq_proc_cmd_server(gc, cmd, seq, buf + bytes, bytes_not_read);
 		}
 		return TRUE;
 	}
@@ -279,9 +279,17 @@ static gboolean packet_process(PurpleCon
 		return TRUE;
 	}
 
+	if (qq_trans_is_server(trans)) {
+		if ( qd->is_finish_update ) {
+			qq_proc_cmd_server(gc, cmd, seq, buf + bytes, bytes_not_read);
+		}
+		return TRUE;
+	}
+
 	update_class = qq_trans_get_class(trans);
 	ship32 = qq_trans_get_ship(trans);
 
+	prev_update_status = qd->is_finish_update;
 	switch (cmd) {
 		case QQ_CMD_TOKEN:
 			if (qq_process_token_reply(gc, buf + bytes, bytes_not_read) == QQ_TOKEN_REPLY_OK) {
@@ -289,7 +297,7 @@ static gboolean packet_process(PurpleCon
 			}
 			break;
 		case QQ_CMD_LOGIN:
-			qq_proc_login_cmd(gc, buf + bytes, bytes_not_read);
+			qq_proc_cmd_login(gc, buf + bytes, bytes_not_read);
 			/* check is redirect or not, and do it now */
 			if (qd->redirect_ip.s_addr != 0) {
 				if (qd->check_watcher > 0) {
@@ -308,13 +316,18 @@ static gboolean packet_process(PurpleCon
 			purple_debug_info("QQ", "%s (0x%02X) for room %d, len %d\n",
 					qq_get_room_cmd_desc(room_cmd), room_cmd, room_id, buf_len);
 #endif
-			qq_proc_room_cmd(gc, seq, room_cmd, room_id, buf + bytes, bytes_not_read, update_class, ship32);
+			qq_proc_room_cmd_reply(gc, seq, room_cmd, room_id, buf + bytes, bytes_not_read, update_class, ship32);
 			break;
 		default:
-			qq_proc_client_cmd(gc, cmd, seq, buf + bytes, bytes_not_read, update_class, ship32);
+			qq_proc_cmd_reply(gc, cmd, seq, buf + bytes, bytes_not_read, update_class, ship32);
 			break;
 	}
 
+	if (prev_update_status != qd->is_finish_update && qd->is_finish_update == TRUE) {
+		/* is_login, but we have packets before login */
+		qq_trans_process_before_login(gc);
+		return TRUE;
+	}
 	return TRUE;
 }
 
@@ -671,6 +684,7 @@ static void do_request_token(PurpleConne
 	qd->send_seq = rand() & 0xffff;
 
 	qd->is_login = FALSE;
+	qd->is_finish_update = FALSE;
 	qd->channel = 1;
 	qd->uid = strtol(purple_account_get_username(purple_connection_get_account(gc)), NULL, 10);
 
@@ -739,140 +753,6 @@ static void connect_cb(gpointer data, gi
 	do_request_token( gc );
 }
 
-#ifndef purple_proxy_connect_udp
-static void udp_can_write(gpointer data, gint source, PurpleInputCondition cond)
-{
-	PurpleConnection *gc;
-	qq_data *qd;
-	socklen_t len;
-	int error=0, ret;
-
-	gc = (PurpleConnection *) data;
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
-
-	qd = (qq_data *) gc->proto_data;
-
-
-	purple_debug_info("proxy", "Connected.\n");
-
-	/*
-	 * getsockopt after a non-blocking connect returns -1 if something is
-	 * really messed up (bad descriptor, usually). Otherwise, it returns 0 and
-	 * error holds what connect would have returned if it blocked until now.
-	 * Thus, error == 0 is success, error == EINPROGRESS means "try again",
-	 * and anything else is a real error.
-	 *
-	 * (error == EINPROGRESS can happen after a select because the kernel can
-	 * be overly optimistic sometimes. select is just a hint that you might be
-	 * able to do something.)
-	 */
-	len = sizeof(error);
-	ret = getsockopt(source, SOL_SOCKET, SO_ERROR, &error, &len);
-	if (ret == 0 && error == EINPROGRESS)
-		return; /* we'll be called again later */
-
-	purple_input_remove(qd->udp_can_write_handler);
-	qd->udp_can_write_handler = 0;
-	if (ret < 0 || error != 0) {
-		if(ret != 0)
-			error = errno;
-
-		close(source);
-
-		purple_debug_error("proxy", "getsockopt SO_ERROR check: %s\n", g_strerror(error));
-
-		connect_cb(gc, -1, _("Unable to connect"));
-		return;
-	}
-
-	connect_cb(gc, source, NULL);
-}
-
-static void udp_host_resolved(GSList *hosts, gpointer data, const char *error_message) {
-	PurpleConnection *gc;
-	qq_data *qd;
-	struct sockaddr server_addr;
-	int addr_size;
-	gint fd = -1;
-	int flags;
-
-	gc = (PurpleConnection *) data;
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
-
-	qd = (qq_data *) gc->proto_data;
-
-	/* udp_query_data must be set as NULL.
-	 * Otherwise purple_dnsquery_destroy in qq_disconnect cause glib double free error */
-	qd->udp_query_data = NULL;
-
-	if (!hosts || !hosts->data) {
-		purple_connection_error_reason(gc,
-			PURPLE_CONNECTION_ERROR_NETWORK_ERROR,
-			_("Couldn't resolve host"));
-		return;
-	}
-
-	addr_size = GPOINTER_TO_INT(hosts->data);
-	hosts = g_slist_remove(hosts, hosts->data);
-	memcpy(&server_addr, hosts->data, addr_size);
-	g_free(hosts->data);
-
-	hosts = g_slist_remove(hosts, hosts->data);
-	while(hosts) {
-		hosts = g_slist_remove(hosts, hosts->data);
-		g_free(hosts->data);
-		hosts = g_slist_remove(hosts, hosts->data);
-	}
-
-	fd = socket(PF_INET, SOCK_DGRAM, 0);
-	if (fd < 0) {
-		purple_debug_error("QQ",
-				"Unable to create socket: %s\n", g_strerror(errno));
-		return;
-	}
-
-	/* we use non-blocking mode to speed up connection */
-	flags = fcntl(fd, F_GETFL);
-	fcntl(fd, F_SETFL, flags | O_NONBLOCK);
-
-	/* From Unix-socket-FAQ: http://www.faqs.org/faqs/unix-faq/socket/
-	 *
-	 * If a UDP socket is unconnected, which is the normal state after a
-	 * bind() call, then send() or write() are not allowed, since no
-	 * destination is available; only sendto() can be used to send data.
-	 *
-	 * Calling connect() on the socket simply records the specified address
-	 * and port number as being the desired communications partner. That
-	 * means that send() or write() are now allowed; they use the destination
-	 * address and port given on the connect call as the destination of packets.
-	 */
-	if (connect(fd, &server_addr, addr_size) >= 0) {
-		purple_debug_info("QQ", "Connected.\n");
-		flags = fcntl(fd, F_GETFL);
-		fcntl(fd, F_SETFL, flags & ~O_NONBLOCK);
-		connect_cb(gc, fd, NULL);
-		return;
-	}
-
-	/* [EINPROGRESS]
-	 *    The socket is marked as non-blocking and the connection cannot be
-	 *    completed immediately. It is possible to select for completion by
-	 *    selecting the socket for writing.
-	 * [EINTR]
-	 *    A signal interrupted the call.
-	 *    The connection is established asynchronously.
-	 */
-	if ((errno == EINPROGRESS) || (errno == EINTR)) {
-			purple_debug_warning( "QQ", "Connect in asynchronous mode.\n");
-			qd->udp_can_write_handler = purple_input_add(fd, PURPLE_INPUT_WRITE, udp_can_write, gc);
-			return;
-		}
-
-	purple_debug_error("QQ", "Connection failed: %s\n", g_strerror(errno));
-	close(fd);
-}
-#endif
-
 gboolean connect_to_server(PurpleConnection *gc, gchar *server, gint port)
 {
 	PurpleAccount *account ;
@@ -899,37 +779,11 @@ gboolean connect_to_server(PurpleConnect
 		purple_proxy_connect_cancel(qd->conn_data);
 		qd->conn_data = NULL;
 	}
-
-#ifdef purple_proxy_connect_udp
-	if (qd->use_tcp) {
-		qd->conn_data = purple_proxy_connect(gc, account, server, port, connect_cb, gc);
-	} else {
-		qd->conn_data = purple_proxy_connect_udp(gc, account, server, port, connect_cb, gc);
-	}
+	qd->conn_data = purple_proxy_connect(gc, account, server, port, connect_cb, gc);
 	if ( qd->conn_data == NULL ) {
 		purple_debug_error("QQ", _("Couldn't create socket"));
 		return FALSE;
 	}
-#else
-	/* QQ connection via UDP/TCP.
-	* Now use Purple proxy function to provide TCP proxy support,
-	* and qq_udp_proxy.c to add UDP proxy support (thanks henry) */
-	if(qd->use_tcp) {
-		qd->conn_data = purple_proxy_connect(gc, account, server, port, connect_cb, gc);
-		if ( qd->conn_data == NULL ) {
-			purple_debug_error("QQ", "Unable to connect.");
-			return FALSE;
-		}
-		return TRUE;
-	}
-
-	purple_debug_info("QQ", "UDP Connect to %s:%d\n", server, port);
-	qd->udp_query_data = purple_dnsquery_a(server, port, udp_host_resolved, gc);
-	if ( qd->udp_query_data == NULL ) {
-		purple_debug_error("QQ", "Could not resolve hostname");
-		return FALSE;
-	}
-#endif
 	return TRUE;
 }
 
@@ -961,17 +815,6 @@ void qq_disconnect(PurpleConnection *gc)
 		purple_proxy_connect_cancel(qd->conn_data);
 		qd->conn_data = NULL;
 	}
-#ifndef purple_proxy_connect_udp
-	if (qd->udp_can_write_handler) {
-		purple_input_remove(qd->udp_can_write_handler);
-		qd->udp_can_write_handler = 0;
-	}
-	if (qd->udp_query_data != NULL) {
-		purple_debug_info("QQ", "destroy udp_query_data\n");
-		purple_dnsquery_destroy(qd->udp_query_data);
-		qd->udp_query_data = NULL;
-	}
-#endif
 	connection_free_all(qd);
 	qd->fd = -1;
 
============================================================
--- libpurple/protocols/qq/qq_process.c	08ba433fdf73eda88946033e9f8e0a25510c3fd6
+++ libpurple/protocols/qq/qq_process.c	0cdaf6d2e2e957e9a0666ac0c2ccf0e25c9bfd5a
@@ -60,7 +60,7 @@ enum {
 };
 
 /* default process, decrypt and dump */
-static void process_cmd_unknow(PurpleConnection *gc,const gchar *title, guint8 *data, gint data_len, guint16 cmd, guint16 seq)
+static void process_cmd_unknow(PurpleConnection *gc,gchar *title, guint8 *data, gint data_len, guint16 cmd, guint16 seq)
 {
 	qq_data *qd;
 	gchar *msg_utf8 = NULL;
@@ -77,13 +77,13 @@ static void process_cmd_unknow(PurpleCon
 			seq, qq_get_cmd_desc(cmd));
 
 	msg_utf8 = try_dump_as_gbk(data, data_len);
-	if (msg_utf8 != NULL) {
-		purple_notify_info(gc, title, msg_utf8, NULL);
+	if (msg_utf8) {
+		purple_notify_info(gc, NULL, msg_utf8, NULL);
 		g_free(msg_utf8);
 	}
 }
 
-void qq_proc_server_cmd(PurpleConnection *gc, guint16 cmd, guint16 seq, guint8 *rcved, gint rcved_len)
+void qq_proc_cmd_server(PurpleConnection *gc, guint16 cmd, guint16 seq, guint8 *rcved, gint rcved_len)
 {
 	qq_data *qd;
 
@@ -122,7 +122,7 @@ void qq_proc_server_cmd(PurpleConnection
 			qq_process_buddy_change_status(data, data_len, gc);
 			break;
 		default:
-			process_cmd_unknow(gc, _("Unknow SERVER CMD"), data, data_len, cmd, seq);
+			process_cmd_unknow(gc, "Unknow SERVER CMD", data, data_len, cmd, seq);
 			break;
 	}
 }
@@ -145,7 +145,7 @@ static void process_room_cmd_notify(Purp
 	g_free(msg_utf8);
 }
 
-void qq_update_room(PurpleConnection *gc, guint8 room_cmd, guint32 room_id)
+void qq_room_update(PurpleConnection *gc, guint8 room_cmd, guint32 room_id)
 {
 	qq_data *qd;
 	qq_group *group;
@@ -198,7 +198,8 @@ static void update_all_rooms(PurpleConne
 
 	next_group = qq_room_get_next(gc, room_id);
 	if (next_group == NULL && room_id <= 0) {
-		purple_debug_info("QQ", "No room. Finished update\n");
+		purple_debug_info("QQ", "No room, nothing update\n");
+		qd->is_finish_update = TRUE;
 		return;
 	}
 	if (next_group == NULL ) {
@@ -225,7 +226,7 @@ static void update_all_rooms(PurpleConne
 			if (!is_new_turn) {
 				qq_request_room_get_buddies(gc, next_group, QQ_CMD_CLASS_UPDATE_ALL);
 			} else {
-				purple_debug_info("QQ", "Finished update\n");
+				qd->is_finish_update = TRUE;
 			}
 			break;
 		default:
@@ -244,7 +245,7 @@ void qq_update_all(PurpleConnection *gc,
 		case 0:
 			qq_request_buddy_info(gc, qd->uid, QQ_CMD_CLASS_UPDATE_ALL, QQ_BUDDY_INFO_UPDATE_ONLY);
 			break;
-		case QQ_CMD_GET_BUDDY_INFO:
+		case QQ_CMD_GET_USER_INFO:
 			qq_request_change_status(gc, QQ_CMD_CLASS_UPDATE_ALL);
 			break;
 		case QQ_CMD_CHANGE_STATUS:
@@ -254,7 +255,7 @@ void qq_update_all(PurpleConnection *gc,
 			qq_request_get_buddies_and_rooms(gc, 0, QQ_CMD_CLASS_UPDATE_ALL);
 			break;
 		case QQ_CMD_GET_BUDDIES_AND_ROOMS:
-			qq_request_get_buddies_level(gc, QQ_CMD_CLASS_UPDATE_ALL);
+			qq_request_get_buddies_levels(gc, QQ_CMD_CLASS_UPDATE_ALL);
 			break;
 		case QQ_CMD_GET_LEVEL:
 			qq_request_get_buddies_online(gc, 0, QQ_CMD_CLASS_UPDATE_ALL);
@@ -278,11 +279,11 @@ static void update_all_rooms_online(Purp
 
 	next_group = qq_room_get_next_conv(gc, room_id);
 	if (next_group == NULL && room_id <= 0) {
-		purple_debug_info("QQ", "No room in conversation, no update online buddies\n");
+		purple_debug_info("QQ", "No room, no update online buddies\n");
 		return;
 	}
 	if (next_group == NULL ) {
-		purple_debug_info("QQ", "finished update rooms' online buddies\n");
+		purple_debug_info("QQ", "finished update online buddies\n");
 		return;
 	}
 
@@ -315,7 +316,7 @@ void qq_update_online(PurpleConnection *
 	}
 }
 
-void qq_proc_room_cmd(PurpleConnection *gc, guint16 seq,
+void qq_proc_room_cmd_reply(PurpleConnection *gc, guint16 seq,
 		guint8 room_cmd, guint32 room_id, guint8 *rcved, gint rcved_len,
 		gint update_class, guint32 ship32)
 {
@@ -444,9 +445,6 @@ void qq_proc_room_cmd(PurpleConnection *
 			   reply_cmd, qq_get_room_cmd_desc(reply_cmd));
 	}
 
-	if (update_class == QQ_CMD_CLASS_NONE)
-		return;
-
 	purple_debug_info("QQ", "Update class %d\n", update_class);
 	if (update_class == QQ_CMD_CLASS_UPDATE_ALL) {
 		update_all_rooms(gc, room_cmd, room_id);
@@ -457,11 +455,11 @@ void qq_proc_room_cmd(PurpleConnection *
 		return;
 	}
 	if (update_class == QQ_CMD_CLASS_UPDATE_ROOM) {
-		qq_update_room(gc, room_cmd, room_id);
+		qq_room_update(gc, room_cmd, room_id);
 	}
 }
 
-void qq_proc_login_cmd(PurpleConnection *gc, guint8 *rcved, gint rcved_len)
+void qq_proc_cmd_login(PurpleConnection *gc, guint8 *rcved, gint rcved_len)
 {
 	qq_data *qd;
 	guint8 *data;
@@ -505,14 +503,11 @@ void qq_proc_login_cmd(PurpleConnection 
 	/* Now goes on updating my icon/nickname, not showing info_window */
 	qd->modifying_face = FALSE;
 
-	/* is_login, but we have packets before login */
-	qq_trans_process_remained(gc);
-
 	qq_update_all(gc, 0);
 	return;
 }
 
-void qq_proc_client_cmd(PurpleConnection *gc, guint16 cmd, guint16 seq,
+void qq_proc_cmd_reply(PurpleConnection *gc, guint16 cmd, guint16 seq,
 		guint8 *rcved, gint rcved_len, gint update_class, guint32 ship32)
 {
 	qq_data *qd;
@@ -563,8 +558,8 @@ void qq_proc_client_cmd(PurpleConnection
 		case QQ_CMD_BUDDY_AUTH:
 			qq_process_add_buddy_auth_reply(data, data_len, gc);
 			break;
-		case QQ_CMD_GET_BUDDY_INFO:
-			qq_process_get_buddy_info(data, data_len, gc);
+		case QQ_CMD_GET_USER_INFO:
+			qq_process_get_info_reply(data, data_len, gc);
 			break;
 		case QQ_CMD_CHANGE_STATUS:
 			qq_process_change_status_reply(data, data_len, gc);
@@ -607,7 +602,7 @@ void qq_proc_client_cmd(PurpleConnection
 			purple_debug_info("QQ", "All buddies and groups received\n");
 			break;
 		default:
-			process_cmd_unknow(gc, _("Unknow reply CMD"), data, data_len, cmd, seq);
+			process_cmd_unknow(gc, "Unknow reply CMD", data, data_len, cmd, seq);
 			is_unknow = TRUE;
 			break;
 	}
============================================================
--- libpurple/protocols/qq/qq_process.h	daf522411883f437790ee7a6bea67f70f0842d35
+++ libpurple/protocols/qq/qq_process.h	2f018e76532ac55f6c6241268da8606ff3ad811b
@@ -37,17 +37,17 @@ enum {
 	QQ_CMD_CLASS_UPDATE_ROOM,
 };
 
-void qq_proc_login_cmd(PurpleConnection *gc, guint8 *rcved, gint rcved_len);
-void qq_proc_client_cmd(PurpleConnection *gc, guint16 cmd, guint16 seq,
+void qq_proc_cmd_login(PurpleConnection *gc, guint8 *rcved, gint rcved_len);
+void qq_proc_cmd_reply(PurpleConnection *gc, guint16 cmd, guint16 seq,
 		guint8 *rcved, gint rcved_len, gint update_class, guint32 ship32);
-void qq_proc_room_cmd(PurpleConnection *gc, guint16 seq,
+void qq_proc_room_cmd_reply(PurpleConnection *gc, guint16 seq,
 		guint8 room_cmd, guint32 room_id, guint8 *rcved, gint rcved_len,
 		gint update_class, guint32 ship32);
 
-void qq_proc_server_cmd(PurpleConnection *gc, guint16 cmd, guint16 seq, guint8 *rcved, gint rcved_len);
+void qq_proc_cmd_server(PurpleConnection *gc, guint16 cmd, guint16 seq, guint8 *rcved, gint rcved_len);
 
 void qq_update_all(PurpleConnection *gc, guint16 cmd);
 void qq_update_online(PurpleConnection *gc, guint16 cmd);
-void qq_update_room(PurpleConnection *gc, guint8 room_cmd, guint32 room_id);
+void qq_room_update(PurpleConnection *gc, guint8 room_cmd, guint32 room_id);
 #endif
 
============================================================
--- libpurple/protocols/qq/qq_trans.c	a90fb710afbb56703e1cb132dd95e0a896f6a013
+++ libpurple/protocols/qq/qq_trans.c	166bf6c83885256e73dfc43353cec519daa9a131
@@ -40,7 +40,7 @@ enum {
 enum {
 	QQ_TRANS_IS_SERVER = 0x01,			/* Is server command or client command */
 	QQ_TRANS_IS_IMPORT = 0x02,			/* Only notice if not get reply; or resend, disconn if reties get 0*/
-	QQ_TRANS_REMAINED = 0x04,		/* server command before login*/
+	QQ_TRANS_BEFORE_LOGIN = 0x04,		/* server command before login*/
 };
 
 struct _qq_transaction {
@@ -225,13 +225,16 @@ void qq_trans_add_room_cmd(PurpleConnect
 	qd->transactions = g_list_append(qd->transactions, trans);
 }
 
-void qq_trans_add_server_cmd(PurpleConnection *gc, guint16 cmd, guint16 seq,
-		guint8 *data, gint data_len)
+void qq_trans_add_server_cmd(PurpleConnection *gc,
+	guint16 cmd, guint16 seq, guint8 *data, gint data_len)
 {
 	qq_data *qd = (qq_data *)gc->proto_data;
 	qq_transaction *trans = trans_create(gc, qd->fd, cmd, seq, data, data_len, QQ_CMD_CLASS_NONE, 0);
 
 	trans->flag = QQ_TRANS_IS_SERVER;
+	if ( !qd->is_login ) {
+		trans->flag |= QQ_TRANS_BEFORE_LOGIN;
+	}
 	trans->send_retries = 0;
 	trans->rcved_times = 1;
 #if 0
@@ -241,26 +244,9 @@ void qq_trans_add_server_cmd(PurpleConne
 	qd->transactions = g_list_append(qd->transactions, trans);
 }
 
-void qq_trans_add_remain(PurpleConnection *gc, guint16 cmd, guint16 seq,
-		guint8 *data, gint data_len)
+void qq_trans_process_before_login(PurpleConnection *gc)
 {
 	qq_data *qd = (qq_data *)gc->proto_data;
-	qq_transaction *trans = trans_create(gc, qd->fd, cmd, seq, data, data_len, QQ_CMD_CLASS_NONE, 0);
-
-	trans->flag = QQ_TRANS_IS_SERVER;
-	trans->flag |= QQ_TRANS_REMAINED;
-	trans->send_retries = 0;
-	trans->rcved_times = 1;
-#if 1
-	purple_debug_info("QQ_TRANS", "Add server cmd and remained, seq %d, data %p, len %d\n",
-			trans->seq, trans->data, trans->data_len);
-#endif
-	qd->transactions = g_list_append(qd->transactions, trans);
-}
-
-void qq_trans_process_remained(PurpleConnection *gc)
-{
-	qq_data *qd = (qq_data *)gc->proto_data;
 	GList *curr;
 	GList *next;
 	qq_transaction *trans;
@@ -277,18 +263,17 @@ void qq_trans_process_remained(PurpleCon
 		if ( !(trans->flag & QQ_TRANS_IS_SERVER) ) {
 			continue;
 		}
-		if ( !(trans->flag & QQ_TRANS_REMAINED) ) {
+		if ( !(trans->flag & QQ_TRANS_BEFORE_LOGIN) ) {
 			continue;
 		}
-		/* set QQ_TRANS_REMAINED off */
-		trans->flag &= ~QQ_TRANS_REMAINED;
+		/* set QQ_TRANS_BEFORE_LOGIN off */
+		trans->flag &= ~QQ_TRANS_BEFORE_LOGIN;
 
-#if 1
 		purple_debug_info("QQ_TRANS",
-				"Process server cmd remained, seq %d, data %p, len %d, send_retries %d\n",
+				"Process server cmd before login, seq %d, data %p, len %d, send_retries %d\n",
 				trans->seq, trans->data, trans->data_len, trans->send_retries);
-#endif
-		qq_proc_server_cmd(gc, trans->cmd, trans->seq, trans->data, trans->data_len);
+
+		qq_proc_cmd_reply(gc, trans->seq, trans->cmd, trans->data, trans->data_len, trans->update_class, trans->ship32);
 	}
 
 	/* purple_debug_info("QQ_TRANS", "Scan finished\n"); */
@@ -310,7 +295,7 @@ gboolean qq_trans_scan(PurpleConnection 
 		trans = (qq_transaction *) (curr->data);
 		/* purple_debug_info("QQ_TRANS", "Scan [%d]\n", trans->seq); */
 
-		if (trans->flag & QQ_TRANS_REMAINED) {
+		if (trans->flag & QQ_TRANS_BEFORE_LOGIN) {
 			/* keep server cmd before login*/
 			continue;
 		}
============================================================
--- libpurple/protocols/qq/qq_trans.h	a34dbbd8bb88978fc90387b057396efdf4c8ad3a
+++ libpurple/protocols/qq/qq_trans.h	f2aa20b1890c075f7279612c60de46c2565f10f2
@@ -46,10 +46,8 @@ void qq_trans_add_server_cmd(PurpleConne
 
 void qq_trans_add_server_cmd(PurpleConnection *gc, guint16 cmd, guint16 seq,
 	guint8 *data, gint data_len);
-void qq_trans_add_remain(PurpleConnection *gc, guint16 cmd, guint16 seq,
-	guint8 *data, gint data_len);
 
-void qq_trans_process_remained(PurpleConnection *gc);
+void qq_trans_process_before_login(PurpleConnection *gc);
 gboolean qq_trans_scan(PurpleConnection *gc);
 void qq_trans_remove_all(PurpleConnection *gc);
 
============================================================
--- libpurple/protocols/qq/sys_msg.c	9a57380ec4c89c894fdcdeb6c7543f83537b26f6
+++ libpurple/protocols/qq/sys_msg.c	b727ae40ad2e341625c4a13fa5405afc921bbe96
@@ -84,7 +84,7 @@ static void _qq_search_before_auth_with_
 
 	nombre = uid_to_purple_name(uid);
 	purple_request_action
-	    (gc, NULL, _("Do you approve the requestion?"), "",
+	    (gc, NULL, _("Do you want to approve the request?"), "",
 		PURPLE_DEFAULT_ACTION_NONE,
 		 purple_connection_get_account(gc), nombre, NULL,
 		 g, 2,
@@ -108,7 +108,7 @@ static void _qq_search_before_add_with_g
 	qq_send_packet_get_info(gc, uid, TRUE);	/* we want to see window */
 	nombre = uid_to_purple_name(uid);
 	purple_request_action
-	    (gc, NULL, _("Do you add the buddy?"), "",
+	    (gc, NULL, _("Do you want to add this buddy?"), "",
 		PURPLE_DEFAULT_ACTION_NONE,
 		 purple_connection_get_account(gc), nombre, NULL,
 		 g, 2,


More information about the Commits mailing list