Mercurial > pidgin
changeset 27610:4bfaf18fcb13
Change a bunch more of our yahoo packets to use the session ID. I believe this
is now all of the packets that aren't p2p related (those packets get their ID's
differently). I also changed what version of the client we claim to be for the
chatrooms. We were claiming to be "ym8.1.0.415" when we should have claimed to
be whatever version is defined in YAHOO_CLIENT_VERSION.
author | John Bailey <rekkanoryo@rekkanoryo.org> |
---|---|
date | Sat, 18 Jul 2009 16:12:12 +0000 |
parents | 8b6bf8479d10 |
children | d6377ec7bcd8 |
files | libpurple/protocols/yahoo/yahoo_doodle.c libpurple/protocols/yahoo/yahoo_picture.c libpurple/protocols/yahoo/yahoochat.c |
diffstat | 3 files changed, 18 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/yahoo_doodle.c Sat Jul 18 08:46:06 2009 +0000 +++ b/libpurple/protocols/yahoo/yahoo_doodle.c Sat Jul 18 16:12:12 2009 +0000 @@ -392,7 +392,7 @@ yd = gc->proto_data; /* Make and send an acknowledge (ready) Doodle packet */ - pkt = yahoo_packet_new(YAHOO_SERVICE_P2PFILEXFER, YAHOO_STATUS_AVAILABLE, 0); + pkt = yahoo_packet_new(YAHOO_SERVICE_P2PFILEXFER, YAHOO_STATUS_AVAILABLE, yd->session_id); yahoo_packet_hash_str(pkt, 49, "IMVIRONMENT"); yahoo_packet_hash_str(pkt, 1, purple_account_get_username(gc->account)); yahoo_packet_hash_str(pkt, 14, message);
--- a/libpurple/protocols/yahoo/yahoo_picture.c Sat Jul 18 08:46:06 2009 +0000 +++ b/libpurple/protocols/yahoo/yahoo_picture.c Sat Jul 18 16:12:12 2009 +0000 @@ -276,7 +276,7 @@ return; } - pkt = yahoo_packet_new(YAHOO_SERVICE_PICTURE, YAHOO_STATUS_AVAILABLE, 0); + pkt = yahoo_packet_new(YAHOO_SERVICE_PICTURE, YAHOO_STATUS_AVAILABLE, yd->session_id); yahoo_packet_hash(pkt, "ssssi", 1, purple_connection_get_display_name(gc), 5, who, 13, "2", 20, yd->picture_url, 192, yd->picture_checksum); @@ -288,7 +288,7 @@ struct yahoo_data *yd = gc->proto_data; struct yahoo_packet *pkt; - pkt = yahoo_packet_new(YAHOO_SERVICE_PICTURE, YAHOO_STATUS_AVAILABLE, 0); + pkt = yahoo_packet_new(YAHOO_SERVICE_PICTURE, YAHOO_STATUS_AVAILABLE, yd->session_id); yahoo_packet_hash_str(pkt, 1, purple_connection_get_display_name(gc)); /* me */ yahoo_packet_hash_str(pkt, 5, who); /* the other guy */ yahoo_packet_hash_str(pkt, 13, "1"); /* 1 = request, 2 = reply */ @@ -300,7 +300,7 @@ struct yahoo_data *yd = gc->proto_data; struct yahoo_packet *pkt; - pkt = yahoo_packet_new(YAHOO_SERVICE_PICTURE_CHECKSUM, YAHOO_STATUS_AVAILABLE, 0); + pkt = yahoo_packet_new(YAHOO_SERVICE_PICTURE_CHECKSUM, YAHOO_STATUS_AVAILABLE, yd->session_id); yahoo_packet_hash(pkt, "ssi", 1, purple_connection_get_display_name(gc), 212, "1", 192, yd->picture_checksum); yahoo_packet_send_and_free(pkt, yd); @@ -311,7 +311,7 @@ struct yahoo_data *yd = gc->proto_data; struct yahoo_packet *pkt; - pkt = yahoo_packet_new(YAHOO_SERVICE_AVATAR_UPDATE, YAHOO_STATUS_AVAILABLE, 0); + pkt = yahoo_packet_new(YAHOO_SERVICE_AVATAR_UPDATE, YAHOO_STATUS_AVAILABLE, yd->session_id); yahoo_packet_hash(pkt, "si", 3, who, 213, type); yahoo_packet_send_and_free(pkt, yd); }
--- a/libpurple/protocols/yahoo/yahoochat.c Sat Jul 18 08:46:06 2009 +0000 +++ b/libpurple/protocols/yahoo/yahoochat.c Sat Jul 18 16:12:12 2009 +0000 @@ -65,14 +65,14 @@ rll = purple_account_get_string(purple_connection_get_account(gc), "room_list_locale", YAHOO_ROOMLIST_LOCALE); - pkt = yahoo_packet_new(YAHOO_SERVICE_CHATONLINE, YAHOO_STATUS_AVAILABLE,0); + pkt = yahoo_packet_new(YAHOO_SERVICE_CHATONLINE, YAHOO_STATUS_AVAILABLE, yd->session_id); yahoo_packet_hash(pkt, "sssss", 109, purple_connection_get_display_name(gc), 1, purple_connection_get_display_name(gc), 6, "abcde", /* I'm not sure this is the correct way to set this. */ 98, rll, - 135, "ym8.1.0.415"); + 135, YAHOO_CLIENT_VERSION); yahoo_packet_send_and_free(pkt, yd); } @@ -376,7 +376,7 @@ * so we don't have to actually pass the flag in the packet. Or something. */ room2 = yahoo_string_encode(gc, room, &utf8); - pkt = yahoo_packet_new(YAHOO_SERVICE_CHATJOIN, YAHOO_STATUS_AVAILABLE, 0); + pkt = yahoo_packet_new(YAHOO_SERVICE_CHATJOIN, YAHOO_STATUS_AVAILABLE, yd->session_id); yahoo_packet_hash(pkt, "ssss", 1, purple_connection_get_display_name(gc), 104, room2, @@ -396,7 +396,7 @@ /* We need to goto a user in chat */ if (yd->pending_chat_goto) { - struct yahoo_packet *pkt = yahoo_packet_new(YAHOO_SERVICE_CHATGOTO, YAHOO_STATUS_AVAILABLE, 0); + struct yahoo_packet *pkt = yahoo_packet_new(YAHOO_SERVICE_CHATGOTO, YAHOO_STATUS_AVAILABLE, yd->session_id); yahoo_packet_hash(pkt, "sss", 109, yd->pending_chat_goto, 1, purple_connection_get_display_name(gc), @@ -764,7 +764,7 @@ purple_debug_misc("yahoo", "leaving conference %s\n", room); - pkt = yahoo_packet_new(YAHOO_SERVICE_CONFLOGOFF, YAHOO_STATUS_AVAILABLE, 0); + pkt = yahoo_packet_new(YAHOO_SERVICE_CONFLOGOFF, YAHOO_STATUS_AVAILABLE, yd->session_id); yahoo_packet_hash_str(pkt, 1, dn); for (w = who; w; w = w->next) { @@ -788,7 +788,7 @@ msg = yahoo_html_to_codes(what); msg2 = yahoo_string_encode(gc, msg, &utf8); - pkt = yahoo_packet_new(YAHOO_SERVICE_CONFMSG, YAHOO_STATUS_AVAILABLE, 0); + pkt = yahoo_packet_new(YAHOO_SERVICE_CONFMSG, YAHOO_STATUS_AVAILABLE, yd->session_id); yahoo_packet_hash_str(pkt, 1, dn); for (who = members; who; who = who->next) { @@ -816,7 +816,7 @@ if (members) memarr = g_strsplit(members, "\n", 0); - pkt = yahoo_packet_new(YAHOO_SERVICE_CONFLOGON, YAHOO_STATUS_AVAILABLE, 0); + pkt = yahoo_packet_new(YAHOO_SERVICE_CONFLOGON, YAHOO_STATUS_AVAILABLE, yd->session_id); yahoo_packet_hash(pkt, "sss", 1, dn, 3, dn, 57, room); if (memarr) { @@ -846,7 +846,7 @@ members = purple_conv_chat_get_users(PURPLE_CONV_CHAT(c)); - pkt = yahoo_packet_new(YAHOO_SERVICE_CONFADDINVITE, YAHOO_STATUS_AVAILABLE, 0); + pkt = yahoo_packet_new(YAHOO_SERVICE_CONFADDINVITE, YAHOO_STATUS_AVAILABLE, yd->session_id); yahoo_packet_hash(pkt, "sssss", 1, dn, 51, buddy, 57, room, 58, msg?msg2:"", 13, "0"); for(; members; members = members->next) { @@ -882,7 +882,7 @@ eroom = yahoo_string_encode(gc, room, &utf8); - pkt = yahoo_packet_new(YAHOO_SERVICE_CHATEXIT, YAHOO_STATUS_AVAILABLE, 0); + pkt = yahoo_packet_new(YAHOO_SERVICE_CHATEXIT, YAHOO_STATUS_AVAILABLE, yd->session_id); yahoo_packet_hash(pkt, "sss", 104, eroom, 109, dn, 108, "1"); yahoo_packet_hash_str(pkt, 112, "0"); /* what does this one mean? */ yahoo_packet_send_and_free(pkt, yd); @@ -900,7 +900,7 @@ return; pkt = yahoo_packet_new(YAHOO_SERVICE_CHATLOGOUT, - YAHOO_STATUS_AVAILABLE, 0); + YAHOO_STATUS_AVAILABLE, yd->session_id); yahoo_packet_hash_str(pkt, 1, dn); yahoo_packet_send_and_free(pkt, yd); @@ -941,7 +941,7 @@ g_free(msg2); room2 = yahoo_string_encode(gc, room, NULL); - pkt = yahoo_packet_new(YAHOO_SERVICE_COMMENT, YAHOO_STATUS_AVAILABLE, 0); + pkt = yahoo_packet_new(YAHOO_SERVICE_COMMENT, YAHOO_STATUS_AVAILABLE, yd->session_id); yahoo_packet_hash(pkt, "sss", 1, dn, 104, room2, 117, msg1); if (me) @@ -978,7 +978,7 @@ if (msg) msg2 = yahoo_string_encode(gc, msg, NULL); - pkt = yahoo_packet_new(YAHOO_SERVICE_CHATADDINVITE, YAHOO_STATUS_AVAILABLE, 0); + pkt = yahoo_packet_new(YAHOO_SERVICE_CHATADDINVITE, YAHOO_STATUS_AVAILABLE, yd->session_id); yahoo_packet_hash(pkt, "sssss", 1, dn, 118, buddy, 104, room2, 117, (msg2?msg2:""), 129, "0"); yahoo_packet_send_and_free(pkt, yd); @@ -1012,7 +1012,7 @@ return; } - pkt = yahoo_packet_new(YAHOO_SERVICE_CHATGOTO, YAHOO_STATUS_AVAILABLE, 0); + pkt = yahoo_packet_new(YAHOO_SERVICE_CHATGOTO, YAHOO_STATUS_AVAILABLE, yd->session_id); yahoo_packet_hash(pkt, "sss", 109, name, 1, purple_connection_get_display_name(gc), 62, "2"); yahoo_packet_send_and_free(pkt, yd); }