Mercurial > pidgin
changeset 19348:f0c4b4fdbd16
Add some additional yahoo keys to the stealth packets to make them work again. Fixes #2654.
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Tue, 21 Aug 2007 04:58:58 +0000 |
parents | e159cee53085 |
children | 0e1a2b80fc68 |
files | libpurple/protocols/yahoo/yahoo.c libpurple/protocols/yahoo/yahoo_friend.c |
diffstat | 2 files changed, 34 insertions(+), 28 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/yahoo.c Tue Aug 21 04:37:13 2007 +0000 +++ b/libpurple/protocols/yahoo/yahoo.c Tue Aug 21 04:58:58 2007 +0000 @@ -3723,10 +3723,10 @@ struct yahoo_data *yd = (struct yahoo_data *)gc->proto_data; struct yahoo_packet *pkt; PurpleGroup *g; - char *group = NULL; - char *group2 = NULL; + const char *group = NULL; + char *group2; YahooFriend *f; - + if (!yd->logged_in) return;
--- a/libpurple/protocols/yahoo/yahoo_friend.c Tue Aug 21 04:37:13 2007 +0000 +++ b/libpurple/protocols/yahoo/yahoo_friend.c Tue Aug 21 04:58:58 2007 +0000 @@ -196,6 +196,8 @@ struct yahoo_data *yd = gc->proto_data; struct yahoo_packet *pkt = NULL; YahooFriend *f; + const char *thirtyone, *thirteen; + int service = -1; if (!yd->logged_in) return; @@ -211,44 +213,48 @@ } if (presence == YAHOO_PRESENCE_PERM_OFFLINE) { - pkt = yahoo_packet_new(YAHOO_SERVICE_PRESENCE_PERM, - YAHOO_STATUS_AVAILABLE, yd->session_id); - - yahoo_packet_hash(pkt, "ssss", - 1, purple_connection_get_display_name(gc), - 31, "1", 13, "2", 7, name); + service = YAHOO_SERVICE_PRESENCE_PERM; + thirtyone = "1"; + thirteen = "2"; } else if (presence == YAHOO_PRESENCE_DEFAULT) { if (f->presence == YAHOO_PRESENCE_PERM_OFFLINE) { - pkt = yahoo_packet_new(YAHOO_SERVICE_PRESENCE_PERM, - YAHOO_STATUS_AVAILABLE, yd->session_id); - - yahoo_packet_hash(pkt, "ssss", - 1, purple_connection_get_display_name(gc), - 31, "2", 13, "2", 7, name); + service = YAHOO_SERVICE_PRESENCE_PERM; + thirtyone = "2"; + thirteen = "2"; } else if (yd->current_status == YAHOO_STATUS_INVISIBLE) { - pkt = yahoo_packet_new(YAHOO_SERVICE_PRESENCE_SESSION, - YAHOO_STATUS_AVAILABLE, yd->session_id); - yahoo_packet_hash(pkt, "ssss", - 1, purple_connection_get_display_name(gc), - 31, "2", 13, "1", 7, name); + service = YAHOO_SERVICE_PRESENCE_SESSION; + thirtyone = "2"; + thirteen = "1"; } } else if (presence == YAHOO_PRESENCE_ONLINE) { if (f->presence == YAHOO_PRESENCE_PERM_OFFLINE) { pkt = yahoo_packet_new(YAHOO_SERVICE_PRESENCE_PERM, YAHOO_STATUS_AVAILABLE, yd->session_id); - yahoo_packet_hash(pkt, "ssss", + yahoo_packet_hash(pkt, "ssssssss", 1, purple_connection_get_display_name(gc), - 31, "2", 13, "2", 7, name); + 31, "2", 13, "2", + 302, "319", 300, "319", + 7, name, + 301, "319", 303, "319"); yahoo_packet_send_and_free(pkt, yd); } - pkt = yahoo_packet_new(YAHOO_SERVICE_PRESENCE_SESSION, - YAHOO_STATUS_AVAILABLE, yd->session_id); - yahoo_packet_hash(pkt, "ssss", - 1, purple_connection_get_display_name(gc), - 31, "1", 13, "1", 7, name); + service = YAHOO_SERVICE_PRESENCE_SESSION; + thirtyone = "1"; + thirteen = "1"; } - if (pkt) + if (service > 0) { + pkt = yahoo_packet_new(service, + YAHOO_STATUS_AVAILABLE, yd->session_id); + + yahoo_packet_hash(pkt, "ssssssss", + 1, purple_connection_get_display_name(gc), + 31, thirtyone, 13, thirteen, + 302, "319", 300, "319", + 7, name, + 301, "319", 303, "319"); + yahoo_packet_send_and_free(pkt, yd); + } }