changeset 27781:11713f052640

yahoo jp file transfer work in progress
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Tue, 04 Mar 2008 18:10:40 +0000
parents 1a121394bfde
children 9cd7892b2c8b
files libpurple/protocols/yahoo/yahoo.c libpurple/protocols/yahoo/yahoo.h libpurple/protocols/yahoo/yahoo_filexfer.c libpurple/protocols/yahoo/yahoo_packet.h
diffstat 4 files changed, 16 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/yahoo.c	Sun Mar 02 21:35:56 2008 +0000
+++ b/libpurple/protocols/yahoo/yahoo.c	Tue Mar 04 18:10:40 2008 +0000
@@ -777,6 +777,7 @@
 				list = g_slist_append(list, im);
 				im->from = pair->value;
 				im->time = time(NULL);
+				im->utf8 = 1;
 			}
 			if (pair->key == 97)
 				if (im)
@@ -791,10 +792,12 @@
 				if (im)
 					im->msg = pair->value;
 			}
+#if 0
 			if (pair->key == 244) { /* Web client? */
 				if (im)
 					im->utf8 = 1;
 			}
+#endif
 			/* IMV key */
 			if (pair->key == 63)
 			{
@@ -1483,11 +1486,12 @@
 	pack = yahoo_packet_new(YAHOO_SERVICE_AUTHRESP,	YAHOO_STATUS_AVAILABLE, 0);
 
 	if(yd->jp) {
-		yahoo_packet_hash(pack, "sssss",
+		yahoo_packet_hash(pack, "ssssss",
 						  0, name,
 						  6, result6,
 						  96, result96,
 						  1, name,
+						  244, YAHOOJP_CLIENT_VERSION_ID,
 						  135, YAHOOJP_CLIENT_VERSION);
 	} else {
 		yahoo_packet_hash(pack, "ssssss",
@@ -1946,11 +1950,12 @@
 	pack = yahoo_packet_new(YAHOO_SERVICE_AUTHRESP,	yd->current_status, 0);
 
 	if(yd->jp) {
-		yahoo_packet_hash(pack, "sssss",
+		yahoo_packet_hash(pack, "ssssss",
 						  0, name,
 						  6, resp_6,
 						  96, resp_96,
 						  1, name,
+						  244, YAHOOJP_CLIENT_VERSION_ID,
 						  135, YAHOOJP_CLIENT_VERSION);
 	} else {
 		yahoo_packet_hash(pack, "ssssss",
--- a/libpurple/protocols/yahoo/yahoo.h	Sun Mar 02 21:35:56 2008 +0000
+++ b/libpurple/protocols/yahoo/yahoo.h	Tue Mar 04 18:10:40 2008 +0000
@@ -76,13 +76,14 @@
 
 #define YAHOO_CLIENT_VERSION_ID "2097087"
 #define YAHOO_CLIENT_VERSION "8.1.0.421"
-#define YAHOOJP_CLIENT_VERSION "6,0,0,1710"
 
 #if 0
+#define YAHOOJP_CLIENT_VERSION "6,0,0,1710"
+#else
 /* The following were observed with the Yahoo Japan client current as of January
  * 2008, but appear not to work correctly for file transfer.  Here as reference */
-# define YAHOOJP_CLIENT_VERSION_ID "524223"
-# define YAHOOJP_CLIENT_VERSION "7,0,1,1"
+#define YAHOOJP_CLIENT_VERSION_ID "524223"
+#define YAHOOJP_CLIENT_VERSION "7,0,1,3"
 #endif
 
 
--- a/libpurple/protocols/yahoo/yahoo_filexfer.c	Sun Mar 02 21:35:56 2008 +0000
+++ b/libpurple/protocols/yahoo/yahoo_filexfer.c	Tue Mar 04 18:10:40 2008 +0000
@@ -1048,6 +1048,10 @@
 	if(yf && yf->version_id > 500000 && !yd->jp)
 		ver = 15; 
 
+	/* recent yahoo japan --yaz */
+	if(yd->jp && yf && yf->version_id > 500000)
+		ver = 15;
+
 	g_return_if_fail(xfer != NULL);
 
 	if(ver == 15) {
--- a/libpurple/protocols/yahoo/yahoo_packet.h	Sun Mar 02 21:35:56 2008 +0000
+++ b/libpurple/protocols/yahoo/yahoo_packet.h	Tue Mar 04 18:10:40 2008 +0000
@@ -123,7 +123,7 @@
 
 #define YAHOO_WEBMESSENGER_PROTO_VER 0x0065
 #define YAHOO_PROTO_VER 0x000f
-#define YAHOO_PROTO_VER_JAPAN 0x000f
+#define YAHOO_PROTO_VER_JAPAN 0x000d
 
 #define YAHOO_PACKET_HDRLEN (4 + 2 + 2 + 2 + 2 + 4 + 4)