Mercurial > pidgin
changeset 14446:1bee09450652
[gaim-migrate @ 17160]
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).
committer: Tailor Script <tailor@pidgin.im>
author | Evan Schoenberg <evan.s@dreskin.net> |
---|---|
date | Mon, 04 Sep 2006 21:58:49 +0000 |
parents | b1a6effcb37a |
children | e88aae4f4c40 |
files | libgaim/protocols/yahoo/yahoo_filexfer.c libgaim/protocols/yahoo/yahoo_packet.c libgaim/protocols/yahoo/yahoo_packet.h libgaim/protocols/yahoo/yahoo_picture.c |
diffstat | 4 files changed, 8 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/libgaim/protocols/yahoo/yahoo_filexfer.c Mon Sep 04 08:19:17 2006 +0000 +++ b/libgaim/protocols/yahoo/yahoo_filexfer.c Mon Sep 04 21:58:49 2006 +0000 @@ -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);
--- a/libgaim/protocols/yahoo/yahoo_packet.c Mon Sep 04 08:19:17 2006 +0000 +++ b/libgaim/protocols/yahoo/yahoo_packet.c Mon Sep 04 21:58:49 2006 +0000 @@ -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)
--- a/libgaim/protocols/yahoo/yahoo_packet.h Mon Sep 04 08:19:17 2006 +0000 +++ b/libgaim/protocols/yahoo/yahoo_packet.h Mon Sep 04 21:58:49 2006 +0000 @@ -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);
--- a/libgaim/protocols/yahoo/yahoo_picture.c Mon Sep 04 08:19:17 2006 +0000 +++ b/libgaim/protocols/yahoo/yahoo_picture.c Mon Sep 04 21:58:49 2006 +0000 @@ -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);