changeset 23409:7ec3dce64369

propagate from branch 'im.pidgin.pidgin.2.4.3' (head ca0056ef37700d4584ae88ce481dd1fe4086e582) to branch 'im.pidgin.pidgin' (head 582755b8228024381c2a9e110de35f0aaedd5dc1)
author Richard Laager <rlaager@wiktel.com>
date Wed, 02 Jul 2008 00:19:29 +0000
parents 2ccda8e9046d (current diff) 0e66def8b25e (diff)
children c3cdc0ea9af5
files ChangeLog NEWS configure.ac libpurple/protocols/oscar/oscar.h libpurple/protocols/zephyr/zephyr.h pidgin/gtkimhtml.c po/POTFILES.in
diffstat 15 files changed, 112 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Jul 01 23:41:20 2008 +0000
+++ b/ChangeLog	Wed Jul 02 00:19:29 2008 +0000
@@ -29,11 +29,23 @@
 	* Added '/msgcolor' command to change colors of different classes of
 	  messages in a conversation. See '/help msgcolor' for details.
 
-version 2.4.3 (??/??/2008):
+version 2.4.3 (07/01/2008):
 	libpurple:
 	* Yahoo! Japan now uses UTF-8, matching the behavior of official clients
 	  and restoring compatibility with the web messenger (Yusuke Odate)
 	* Setting your buddy icon once again works for Yahoo! accounts.
+	* Fixes in the Yahoo! protocol to prevent a double free, crashes on
+	  aliases, and alias functionality
+	* Fix crashes in the bonjour protocol
+	* Always use UTF-8 for Yahoo! (#5973)
+	* Fix a crash when the given jabber id is invalid.
+	* Make the IRC "unknown message" debugging messages UTF-8 safe.
+	* Fix connecting to ICQ
+	* Fix a memleak when handling jabber xforms.
+
+	Pidgin:
+	* Include the send button plugin in the win32 build
+	* Various memory leak fixes
 
 version 2.4.2 (05/17/2008):
 	libpurple:
--- a/ChangeLog.win32	Tue Jul 01 23:41:20 2008 +0000
+++ b/ChangeLog.win32	Wed Jul 02 00:19:29 2008 +0000
@@ -1,4 +1,4 @@
-version 2.4.3 (??/??/2008):
+version 2.4.3 (07/01/2008):
 	* No changes
 
 version 2.4.2 (05/17/2008):
--- a/NEWS	Tue Jul 01 23:41:20 2008 +0000
+++ b/NEWS	Wed Jul 02 00:19:29 2008 +0000
@@ -1,5 +1,9 @@
 Pidgin and Finch: The Pimpin' Penguin IM Clients That're Good for the Soul
 
+2.4.3 (07/01/2008):
+	Richard: This release includes important bug fixes.  I'm just cutting
+	the release.  Thank you to the real heroes who did the fixing!
+
 2.4.2 (5/17/2008):
 	Sadrul: We added some usability changes in this release, including the
 	typing notification, buddyicon and input area size in the conversation
--- a/configure.ac	Tue Jul 01 23:41:20 2008 +0000
+++ b/configure.ac	Wed Jul 02 00:19:29 2008 +0000
@@ -47,7 +47,7 @@
 m4_define([purple_major_version], [2])
 m4_define([purple_minor_version], [5])
 m4_define([purple_micro_version], [0])
-m4_define([purple_version_suffix], [devel])
+m4_define([purple_version_suffix], [])
 m4_define([purple_version],
           [purple_major_version.purple_minor_version.purple_micro_version])
 m4_define([purple_display_version], purple_version[]m4_ifdef([purple_version_suffix],[purple_version_suffix]))
@@ -56,7 +56,7 @@
 m4_define([gnt_major_version], [2])
 m4_define([gnt_minor_version], [5])
 m4_define([gnt_micro_version], [0])
-m4_define([gnt_version_suffix], [devel])
+m4_define([gnt_version_suffix], [])
 m4_define([gnt_version],
           [gnt_major_version.gnt_minor_version.gnt_micro_version])
 m4_define([gnt_display_version], gnt_version[]m4_ifdef([gnt_version_suffix],[gnt_version_suffix]))
--- a/libpurple/protocols/qq/AUTHORS	Tue Jul 01 23:41:20 2008 +0000
+++ b/libpurple/protocols/qq/AUTHORS	Wed Jul 02 00:19:29 2008 +0000
@@ -9,11 +9,27 @@
 rakescar    : provided filter for HTML tag
 yyw         : improved performance on PPC linux
 lvxiang     : provided ip to location original code
-csyfek      : faces
 markhuetsch : OpenQ merge into libpurple, maintainer 2006-2007
+ccpaging    : maintainer since 2007
+icesky      : maintainer since 2007
+csyfek      : faces, maintainer since 2007
+
+Lovely Patch Writers
+=====
+Gnap.An     : message displaying, documentation
+manphiz     : qun processing
+moo         : qun processing
+Coly Li     : qun processing
 
 Acknowledgement
 =====
 Shufeng Tan : http://sf.net/projects/perl-oicq
 Jeff Ye     : http://www.sinomac.com
 Hu Zheng    : http://forlinux.yeah.net
+yunfan      : http://www.myswear.net
+khc@pidgin.im
+qulogic@pidgin.im
+rlaager@pidgin.im
+OpenQ Team
+LumaQQ Team
+OpenQ@GoogleGroup
--- a/libpurple/protocols/qq/ChangeLog	Tue Jul 01 23:41:20 2008 +0000
+++ b/libpurple/protocols/qq/ChangeLog	Wed Jul 02 00:19:29 2008 +0000
@@ -1,3 +1,14 @@
+2008.06.29 - csyfek <csyfek(at)gmail.com>
+	* Minor bug fix
+	* Add some doxygen syntax for preparing development documentation
+	* References #6199
+
+2008.06.28 - ccpaging <ecc_hy(at)hotmail.com>, moo <phpxcache(at)gmail.com>
+	* Patches from moo<phpxcache@gmail.com> and ccpaging<ccpaging@foxmail.com>.
+	* Tickets:
+	* Fixes #4956.
+	* Fixes #2998.
+
 2008.06.07 - ccpaging <ecc_hy(at)hotmail.com>, csyfek <csyfek(at)gmail.com>
 	* Clean code and apply patches from QuLogic
 
--- a/libpurple/protocols/qq/buddy_list.c	Tue Jul 01 23:41:20 2008 +0000
+++ b/libpurple/protocols/qq/buddy_list.c	Wed Jul 02 00:19:29 2008 +0000
@@ -147,6 +147,7 @@
 {
 	qq_data *qd;
 	gint len, bytes, bytes_buddy;
+	gint count;
 	guint8 *data, position;
 	PurpleBuddy *b;
 	qq_buddy *q_bud;
@@ -173,6 +174,7 @@
 	fe = g_newa(qq_friends_online_entry, 1);
 	fe->s = g_newa(qq_buddy_status, 1);
 
+	count = 0;
 	while (bytes < len) {
 		/* set flag */
 		bytes_buddy = bytes;
@@ -217,6 +219,7 @@
 			q_bud->flag1 = fe->flag1;
 			q_bud->comm_flag = fe->comm_flag;
 			qq_update_buddy_contact(gc, q_bud);
+			count++;
 		} else {
 			purple_debug(PURPLE_DEBUG_ERROR, "QQ", 
 					"Got an online buddy %d, but not in my buddy list\n", fe->s->uid);
@@ -232,10 +235,14 @@
 	}
 
 	if (position != QQ_FRIENDS_ONLINE_POSITION_END) {
-		purple_debug(PURPLE_DEBUG_INFO, "QQ", "Has more online buddies, position from %d\n", position);
-
+		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"); 
+		}
 		qq_send_packet_get_buddies_online(gc, position);
 	} else {
+		purple_debug(PURPLE_DEBUG_INFO, "QQ", "All online buddies received\n"); 
 		qq_send_packet_get_buddies_levels(gc);
 		qq_refresh_all_buddy_status(gc);
 	}
@@ -247,7 +254,7 @@
 {
 	qq_data *qd;
 	qq_buddy *q_bud;
-	gint len, bytes_expected, i;
+	gint len, bytes_expected, count;
 	gint bytes, buddy_bytes;
 	guint16 position, unknown;
 	guint8 *data, pascal_len;
@@ -267,7 +274,7 @@
 	bytes = 0;
 	bytes += qq_get16(&position, data + bytes);
 	/* the following data is buddy list in this packet */
-	i = 0;
+	count = 0;
 	while (bytes < len) {
 		q_bud = g_new0(qq_buddy, 1);
 		/* set flag */
@@ -306,7 +313,7 @@
 			g_free(q_bud);
 			continue;
 		} else {
-			i++;
+			count++;
 		}
 
 		if (QQ_DEBUG) {
@@ -332,11 +339,16 @@
 		purple_debug(PURPLE_DEBUG_ERROR, "QQ", 
 				"qq_process_get_buddies_list_reply: Dangerous error! maybe protocol changed, notify developers!");
 	}
-	if (position == QQ_FRIENDS_LIST_POSITION_END) {
-		purple_debug(PURPLE_DEBUG_INFO, "QQ", "Get friends list done, %d buddies\n", i);
-		qq_send_packet_get_buddies_online(gc, QQ_FRIENDS_ONLINE_POSITION_START);
+
+	purple_debug(PURPLE_DEBUG_INFO, "QQ", "Received %d buddies, nextposition=%u\n",
+		count, (guint) position);
+	if (position != QQ_FRIENDS_LIST_POSITION_START
+		&& position != QQ_FRIENDS_LIST_POSITION_END) { 
+		purple_debug(PURPLE_DEBUG_INFO, "QQ", "Requesting for more buddies\n"); 
+		qq_send_packet_get_buddies_list(gc, position);
 	} else {
-		qq_send_packet_get_buddies_list(gc, position);
+		purple_debug(PURPLE_DEBUG_INFO, "QQ", "All buddies received. Requesting for online buddies list\n");
+		qq_send_packet_get_buddies_online(gc, QQ_FRIENDS_LIST_POSITION_START); 
 	}
 }
 
@@ -419,4 +431,11 @@
 	}
 
 	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) {
+		purple_debug(PURPLE_DEBUG_INFO, "QQ", "Requesting for more buddies and groups\n");
+		qq_send_packet_get_all_list_with_group(gc, position);
+	} else {
+		purple_debug(PURPLE_DEBUG_INFO, "QQ", "All buddies and groups received\n"); 
+	}
 }
--- a/libpurple/protocols/qq/buddy_list.h	Tue Jul 01 23:41:20 2008 +0000
+++ b/libpurple/protocols/qq/buddy_list.h	Wed Jul 02 00:19:29 2008 +0000
@@ -32,6 +32,8 @@
 #define QQ_FRIENDS_LIST_POSITION_END 		0xffff
 #define QQ_FRIENDS_ONLINE_POSITION_START 	0x00
 #define QQ_FRIENDS_ONLINE_POSITION_END 		0xff
+#define QQ_FRIENDS_ALL_LIST_POSITION_START  0x00000000
+#define QQ_FRIENDS_ALL_LIST_POSITION_END  0xffffffff
 
 void qq_send_packet_get_buddies_online(PurpleConnection *gc, guint8 position);
 void qq_process_get_buddies_online_reply(guint8 *buf, gint buf_len, PurpleConnection *gc);
--- a/libpurple/protocols/qq/char_conv.c	Tue Jul 01 23:41:20 2008 +0000
+++ b/libpurple/protocols/qq/char_conv.c	Wed Jul 02 00:19:29 2008 +0000
@@ -123,9 +123,14 @@
 	return g_strdup(QQ_NULL_MSG);
 }
 
-/* take the input as a pascal string and return a converted c-string in UTF-8
+/**
+ * @brief 把输入作为一个pascal字符串并返回一个用UFT-8转换的c-字符串.\n
+ * 返回已读入的字节数,或者当遇到错误时返回-1.该完成转换的UTF-8字符串被保存到ret中
+ *
+ * take the input as a pascal string and return a converted c-string in UTF-8
  * returns the number of bytes read, return -1 if fatal error
- * the converted UTF-8 will be saved in ret */
+ * the converted UTF-8 will be saved in ret
+ */ 
 gint convert_as_pascal_string(guint8 *data, gchar **ret, const gchar *from_charset) 
 {
 	guint8 len;
--- a/libpurple/protocols/qq/group_info.c	Tue Jul 01 23:41:20 2008 +0000
+++ b/libpurple/protocols/qq/group_info.c	Wed Jul 02 00:19:29 2008 +0000
@@ -141,6 +141,9 @@
 	qq_send_group_cmd(gc, group, raw_data, bytes);
 }
 
+/**
+ * @brief 处理群信息.当前群信息的处理还不完善,由于版本的不同导致协议的解读有差异.
+ */
 void qq_process_group_cmd_get_group_info(guint8 *data, gint len, PurpleConnection *gc)
 {
 	qq_group *group;
@@ -163,7 +166,7 @@
 	g_return_if_fail(internal_group_id > 0);
 
 	bytes += qq_get32(&(external_group_id), data + bytes);
-	g_return_if_fail(internal_group_id > 0);
+	g_return_if_fail(external_group_id > 0);
 
 	pending_id = qq_get_pending_id(qd->adding_groups_from_server, internal_group_id);
 	if (pending_id != NULL) {
@@ -183,13 +186,24 @@
 	bytes += qq_get32(&(group->group_category), data + bytes);
 	bytes += qq_get16(&max_members, data + bytes);
 	bytes += qq_get8(&unknown1, data + bytes);
-	bytes += qq_get32(&(unknown4), data + bytes);	/* versionID */
-
+	/* XXX
+	 * the following, while Eva:
+	 * 4(unk), 4(verID), 1(nameLen), nameLen(qunNameContent), 1(0x00),
+	 * 2(qunNoticeLen), qunNoticeLen(qunNoticeContent, 1(qunDescLen),
+	 * qunDestLen(qunDestcontent)) */
+	bytes += qq_get8(&unknown1, data + bytes);
+	purple_debug(PURPLE_DEBUG_INFO, "QQ", "type=%u creatorid=%u category=%u\n",
+			group->group_type, group->creator_uid, group->group_category);
+	purple_debug(PURPLE_DEBUG_INFO, "QQ", "maxmembers=%u", max_members); 
+	
 	/* strlen + <str content> */
 	bytes += convert_as_pascal_string(data + bytes, &(group->group_name_utf8), QQ_CHARSET_DEFAULT);
+	purple_debug(PURPLE_DEBUG_INFO, "QQ", "group \"%s\"\n", group->group_name_utf8); 
 	bytes += qq_get16(&unknown, data + bytes);	/* 0x0000 */
 	bytes += convert_as_pascal_string(data + bytes, &(group->notice_utf8), QQ_CHARSET_DEFAULT);
+	purple_debug(PURPLE_DEBUG_INFO, "QQ", "notice \"%s\"\n", group->notice_utf8); 
 	bytes += convert_as_pascal_string(data + bytes, &(group->group_desc_utf8), QQ_CHARSET_DEFAULT);
+	purple_debug(PURPLE_DEBUG_INFO, "QQ", "group_desc \"%s\"\n", group->group_desc_utf8); 
 
 	num = 0;
 	/* now comes the member list separated by 0x00 */
--- a/libpurple/protocols/qq/group_internal.c	Tue Jul 01 23:41:20 2008 +0000
+++ b/libpurple/protocols/qq/group_internal.c	Wed Jul 02 00:19:29 2008 +0000
@@ -230,7 +230,9 @@
 		*list = g_slist_remove(*list, GINT_TO_POINTER(id));
 }
 
-/* Return the location of id in list, or NULL if not found */
+/**
+ * @brief Return the location of id in list, or NULL if not found (返回id在链表中的位置,没有找到则返回NULL)
+ */
 GSList *qq_get_pending_id(GSList *list, guint32 id)
 {
         return g_slist_find(list, GINT_TO_POINTER(id));
--- a/libpurple/protocols/qq/im.c	Tue Jul 01 23:41:20 2008 +0000
+++ b/libpurple/protocols/qq/im.c	Wed Jul 02 00:19:29 2008 +0000
@@ -384,8 +384,9 @@
 			im_unprocessed->length = len - bytes;
 			/* a simple process here, maybe more later */
 			purple_debug (PURPLE_DEBUG_WARNING, "QQ",
-					"Normal IM, unprocessed type [0x%04x], unknown [0x%02x], len %d\n",
-					common->normal_im_type, im_unprocessed->unknown, im_unprocessed->length);
+					"Normal IM, unprocessed type [0x%04x], len %d\n",
+					common->normal_im_type, im_unprocessed->length);
+			qq_show_packet ("QQ unk-im", im_unprocessed->unknown, im_unprocessed->length);
 			g_free (common->session_md5);
 			return;
 	}
--- a/libpurple/protocols/qq/qq_network.c	Tue Jul 01 23:41:20 2008 +0000
+++ b/libpurple/protocols/qq/qq_network.c	Wed Jul 02 00:19:29 2008 +0000
@@ -933,7 +933,7 @@
 			return;
 		}
 
-	purple_debug(PURPLE_DEBUG_ERROR, "QQ", "Connection failed: %d\n", g_strerror(errno));
+	purple_debug(PURPLE_DEBUG_ERROR, "QQ", "Connection failed: %s\n", g_strerror(errno));
 	close(fd);
 }
 
--- a/libpurple/protocols/qq/utils.c	Tue Jul 01 23:41:20 2008 +0000
+++ b/libpurple/protocols/qq/utils.c	Wed Jul 02 00:19:29 2008 +0000
@@ -293,12 +293,12 @@
 	str = g_string_new("");
 	for (i = 0; i < bytes; i += 16) {
 		/* length label */
-		g_string_append_printf(str, "%04d: ", i);
+		g_string_append_printf(str, "%07x: ", i);
 
 		/* dump hex value */
 		for (j = 0; j < 16; j++)
 			if ((i + j) < bytes)
-				g_string_append_printf(str, " %02X", buffer[i + j]);
+				g_string_append_printf(str, " %02x", buffer[i + j]);
 			else
 				g_string_append(str, "   ");
 		g_string_append(str, "  ");
--- a/po/POTFILES.in	Tue Jul 01 23:41:20 2008 +0000
+++ b/po/POTFILES.in	Wed Jul 02 00:19:29 2008 +0000
@@ -143,12 +143,9 @@
 libpurple/protocols/qq/keep_alive.c
 libpurple/protocols/qq/login_logout.c
 libpurple/protocols/qq/qq.c
-libpurple/protocols/qq/qq_proxy.c
-libpurple/protocols/qq/recv_core.c
+libpurple/protocols/qq/qq_network.c
 libpurple/protocols/qq/send_file.c
-libpurple/protocols/qq/sendqueue.c
 libpurple/protocols/qq/sys_msg.c
-libpurple/protocols/qq/udp_proxy_s5.c
 libpurple/protocols/sametime/sametime.c
 libpurple/protocols/silc/buddy.c
 libpurple/protocols/silc/chat.c