From: <ev...@us...> - 2006-09-04 21:58:57
|
Revision: 17160 http://svn.sourceforge.net/gaim/?rev=17160&view=rev Author: evands Date: 2006-09-04 14:58:49 -0700 (Mon, 04 Sep 2006) Log Message: ----------- This patch was mentioned by Mark on gaim-devel; Tim replied, "That sounds good. As long as they're both #define's I can easily change." which they are :) Yahoo! Japan appears to not support - or at least not support in its current iteration -- the new Yahoo protocol version (0x000f), disconnecting us immediately if we send it. When connecting to Yahoo Japan, we now send the old version, (0x000c). Modified Paths: -------------- trunk/libgaim/protocols/yahoo/yahoo_filexfer.c trunk/libgaim/protocols/yahoo/yahoo_packet.c trunk/libgaim/protocols/yahoo/yahoo_packet.h trunk/libgaim/protocols/yahoo/yahoo_picture.c Modified: trunk/libgaim/protocols/yahoo/yahoo_filexfer.c =================================================================== --- trunk/libgaim/protocols/yahoo/yahoo_filexfer.c 2006-09-04 08:19:17 UTC (rev 17159) +++ trunk/libgaim/protocols/yahoo/yahoo_filexfer.c 2006-09-04 21:58:49 UTC (rev 17160) @@ -212,7 +212,7 @@ content_length = YAHOO_PACKET_HDRLEN + yahoo_packet_length(pkt); - pkt_buf_len = yahoo_packet_build(pkt, 8, FALSE, &pkt_buf); + pkt_buf_len = yahoo_packet_build(pkt, 8, FALSE, yd->jp, &pkt_buf); yahoo_packet_free(pkt); host = gaim_account_get_string(account, "xfer_host", YAHOO_XFER_HOST); Modified: trunk/libgaim/protocols/yahoo/yahoo_packet.c =================================================================== --- trunk/libgaim/protocols/yahoo/yahoo_packet.c 2006-09-04 08:19:17 UTC (rev 17159) +++ trunk/libgaim/protocols/yahoo/yahoo_packet.c 2006-09-04 21:58:49 UTC (rev 17160) @@ -294,7 +294,7 @@ size_t yahoo_packet_build(struct yahoo_packet *pkt, int pad, gboolean wm, - guchar **buf) + gboolean jp, guchar **buf) { size_t pktlen = yahoo_packet_length(pkt); size_t len = YAHOO_PACKET_HDRLEN + pktlen; @@ -307,6 +307,8 @@ if (wm) pos += yahoo_put16(data + pos, YAHOO_WEBMESSENGER_PROTO_VER); + else if (jp) + pos += yahoo_put16(data + pos, YAHOO_PROTO_VER_JAPAN); else pos += yahoo_put16(data + pos, YAHOO_PROTO_VER); pos += yahoo_put16(data + pos, 0x0000); @@ -331,7 +333,7 @@ if (yd->fd < 0) return -1; - len = yahoo_packet_build(pkt, 0, yd->wm, &data); + len = yahoo_packet_build(pkt, 0, yd->wm, yd->jp, &data); yahoo_packet_dump(data, len); if (yd->txhandler == -1) Modified: trunk/libgaim/protocols/yahoo/yahoo_packet.h =================================================================== --- trunk/libgaim/protocols/yahoo/yahoo_packet.h 2006-09-04 08:19:17 UTC (rev 17159) +++ trunk/libgaim/protocols/yahoo/yahoo_packet.h 2006-09-04 21:58:49 UTC (rev 17160) @@ -117,6 +117,7 @@ #define YAHOO_WEBMESSENGER_PROTO_VER 0x0065 #define YAHOO_PROTO_VER 0x000f +#define YAHOO_PROTO_VER_JAPAN 0x000c #define YAHOO_PACKET_HDRLEN (4 + 2 + 2 + 2 + 2 + 4 + 4) @@ -127,7 +128,7 @@ void yahoo_packet_hash_int(struct yahoo_packet *pkt, int key, int value); int yahoo_packet_send(struct yahoo_packet *pkt, struct yahoo_data *yd); int yahoo_packet_send_and_free(struct yahoo_packet *pkt, struct yahoo_data *yd); -size_t yahoo_packet_build(struct yahoo_packet *pkt, int pad, gboolean wm, +size_t yahoo_packet_build(struct yahoo_packet *pkt, int pad, gboolean wm, gboolean jp, guchar **buf); void yahoo_packet_read(struct yahoo_packet *pkt, const guchar *data, int len); void yahoo_packet_write(struct yahoo_packet *pkt, guchar *data); Modified: trunk/libgaim/protocols/yahoo/yahoo_picture.c =================================================================== --- trunk/libgaim/protocols/yahoo/yahoo_picture.c 2006-09-04 08:19:17 UTC (rev 17159) +++ trunk/libgaim/protocols/yahoo/yahoo_picture.c 2006-09-04 21:58:49 UTC (rev 17160) @@ -481,7 +481,7 @@ /* There's no magic here, we just need to prepend in reverse order */ g_string_prepend(d->str, "29\xc0\x80"); - pkt_buf_len = yahoo_packet_build(pkt, 8, FALSE, &pkt_buf); + pkt_buf_len = yahoo_packet_build(pkt, 8, FALSE, yd->jp, &pkt_buf); yahoo_packet_free(pkt); g_string_prepend_len(d->str, (char *)pkt_buf, pkt_buf_len); g_free(pkt_buf); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |