pidgin.openq: c4009d16: 2008.10.09 - ccpaging <ccpaging(at)gmail...

csyfek at gmail.com csyfek at gmail.com
Tue Oct 28 12:55:55 EDT 2008


-----------------------------------------------------------------
Revision: c4009d16cf58a72f8ba4322bcd04a461a3c5e54a
Ancestor: ec4e796b19f15f587ef3135f3f0c4da116d165e6
Author: csyfek at gmail.com
Date: 2008-10-28T16:39:23
Branch: im.pidgin.pidgin.openq
URL: http://d.pidgin.im/viewmtn/revision/info/c4009d16cf58a72f8ba4322bcd04a461a3c5e54a

Modified files:
        libpurple/protocols/qq/ChangeLog
        libpurple/protocols/qq/char_conv.c
        libpurple/protocols/qq/group_im.c
        libpurple/protocols/qq/group_internal.c
        libpurple/protocols/qq/im.c

ChangeLog: 

2008.10.09 - ccpaging <ccpaging(at)gmail.com>
	* 20081009-1

-------------- next part --------------
============================================================
--- libpurple/protocols/qq/ChangeLog	3b44a7e63becabc8b1db2dfb75b203e7fc36e826
+++ libpurple/protocols/qq/ChangeLog	4d89213091e40b8bf63e3f797b9263bf752469b1
@@ -1,4 +1,7 @@ 2008.10.09 - ccpaging <ccpaging(at)gmail
 2008.10.09 - ccpaging <ccpaging(at)gmail.com>
+	* 20081009-1
+
+2008.10.09 - ccpaging <ccpaging(at)gmail.com>
 	* Update 'group' protocol
 	* Functions of group_find, group_free, group_search merged into group_join and group_internal 
 	* Removed group_find.c/h, group_free.c/h, group_search.c/h 
============================================================
--- libpurple/protocols/qq/char_conv.c	ba89588cf39e61f57b36476bcbf92a1a2e906049
+++ libpurple/protocols/qq/char_conv.c	6d4fbf9abcb6cca84cf7e50acdf3660c82628d7e
@@ -157,9 +157,6 @@ gchar *qq_encode_to_purple(guint8 *data,
 	/* checked qq_show_packet OK */
 	/* qq_show_packet("QQ_MESG recv for font style", data, len); */
 
-	if (client_version >= 2007) {
-		bytes += 1;
-	}
 	bytes += qq_get8(&font_attr, data + bytes);
 	bytes += qq_getdata(color, 3, data + bytes);	/* red,green,blue */
 	color_code = g_strdup_printf("#%02x%02x%02x", color[0], color[1], color[2]);
============================================================
--- libpurple/protocols/qq/group_im.c	5428b66ff658a43a93e7657bb4354aa3a7a4f958
+++ libpurple/protocols/qq/group_im.c	248ddaa0787503c8a368f5b7bcca9b6115d89af5
@@ -445,16 +445,14 @@ void qq_process_room_msg_normal(guint8 *
 		gint font_attr_len;
 	} packet;
 
-
 	g_return_if_fail(data != NULL && data_len > 0);
 
 	/* FIXME: check length here */
 
 	qd = (qq_data *) gc->proto_data;
 
-#if 1
-	qq_show_packet("Room IM", data, data_len);
-#endif
+	/* qq_show_packet("ROOM_IM", data, data_len); */
+
 	memset(&packet, 0, sizeof(packet));
 	bytes = 0;
 	bytes += qq_get32(&(packet.ext_id), data + bytes);
@@ -481,7 +479,6 @@ void qq_process_room_msg_normal(guint8 *
 
 	bytes += qq_get16(&(packet.msg_len), data + bytes);
 	g_return_if_fail(packet.msg_len > 0);
-
 	/*
 	 * 10 bytes from lumaqq
 	 *    contentType = buf.getChar();
@@ -497,15 +494,19 @@ void qq_process_room_msg_normal(guint8 *
 		skip_len = 0;
 	bytes += skip_len;
 
+	/* qq_show_packet("Message", data + bytes, data_len - bytes); */
+
 	packet.msg = g_strdup((gchar *) data + bytes);
 	bytes += strlen(packet.msg) + 1;
 	/* there might not be any font_attr, check it */
-	packet.font_attr_len = packet.msg_len - strlen(packet.msg) - 1 - skip_len;
-	if (packet.font_attr_len > 0)
+	packet.font_attr_len = data_len - bytes;
+	if (packet.font_attr_len > 0) {
 		packet.font_attr = g_memdup(data + bytes, packet.font_attr_len);
-	else
+		qq_show_packet("font_attr", packet.font_attr, packet.font_attr_len);
+	} else {
 		packet.font_attr = NULL;
-
+	}
+	
 	/* group im_group has no flag to indicate whether it has font_attr or not */
 	msg_with_purple_smiley = qq_smiley_to_purple(packet.msg);
 	if (packet.font_attr_len > 0) {
============================================================
--- libpurple/protocols/qq/group_internal.c	5624623ac9a2fe3801602936da42687481d57db1
+++ libpurple/protocols/qq/group_internal.c	8fa420294d11ae026edf1feb14fe5f74f8989cfe
@@ -156,6 +156,7 @@ PurpleChat *qq_room_find_or_new(PurpleCo
 	if (rmd == NULL) {
 		rmd = room_data_new(id, ext_id, NULL);
 		g_return_val_if_fail(rmd != NULL, NULL);
+		rmd->my_role = QQ_ROOM_ROLE_YES;
 		qd->groups = g_list_append(qd->groups, rmd);
 	}
 
============================================================
--- libpurple/protocols/qq/im.c	867d5d0d992b66edb97a8360abafb7ad6aa4e0bb
+++ libpurple/protocols/qq/im.c	9a375834d9347e56428560d04dbb6d25cbb460fe
@@ -593,10 +593,10 @@ void qq_request_send_im(PurpleConnection
 	bytes += qq_putdata(raw_data + bytes, (guint8 *) msg_filtered, msg_len);
 	send_im_tail = qq_get_send_im_tail(font_color, font_size, font_name, is_bold,
 			is_italic, is_underline, tail_len);
-	qq_show_packet("QQ_send_im_tail debug", send_im_tail, tail_len);
+	/* qq_show_packet("qq_get_send_im_tail", send_im_tail, tail_len); */
 	bytes += qq_putdata(raw_data + bytes, send_im_tail, tail_len);
 
-	qq_show_packet("QQ_raw_data debug", raw_data, bytes);
+	/* qq_show_packet("QQ_CMD_SEND_IM, raw_data, bytes); */
 
 	if (bytes == raw_len)	/* create packet OK */
 		qq_send_cmd(gc, QQ_CMD_SEND_IM, raw_data, bytes);


More information about the Commits mailing list