# HG changeset patch # User Tim Ringenbach # Date 1087705307 0 # Node ID 119f8a2c00b642a807206d34f33020341838a85e # Parent 542ad8b1a50f740bb2f2dcfcdb3adc6cd904cd8a [gaim-migrate @ 10130] Move a function, and add a debug statement. committer: Tailor Script diff -r 542ad8b1a50f -r 119f8a2c00b6 src/protocols/yahoo/yahoo_picture.c --- a/src/protocols/yahoo/yahoo_picture.c Sun Jun 20 00:09:34 2004 +0000 +++ b/src/protocols/yahoo/yahoo_picture.c Sun Jun 20 04:21:47 2004 +0000 @@ -62,29 +62,6 @@ g_free(d); } -void yahoo_send_picture_info(GaimConnection *gc, const char *who) -{ - struct yahoo_data *yd = gc->proto_data; - struct yahoo_packet *pkt; - char *buf; - - if (!yd->picture_url) - return; - - pkt = yahoo_packet_new(YAHOO_SERVICE_PICTURE, YAHOO_STATUS_AVAILABLE, 0); - yahoo_packet_hash(pkt, 1, gaim_connection_get_display_name(gc)); - yahoo_packet_hash(pkt, 4, gaim_connection_get_display_name(gc)); - yahoo_packet_hash(pkt, 5, who); - yahoo_packet_hash(pkt, 13, "2"); - yahoo_packet_hash(pkt, 20, yd->picture_url); - buf = g_strdup_printf("%d", yd->picture_checksum); - yahoo_packet_hash(pkt, 192, buf); - - yahoo_send_packet(yd, pkt); - yahoo_packet_free(pkt); - g_free(buf); -} - void yahoo_process_picture(GaimConnection *gc, struct yahoo_packet *pkt) { GSList *l = pkt->hash; @@ -170,8 +147,10 @@ if (who) { if (icon == 2) yahoo_send_picture_request(gc, who); - else if (icon == 0) + else if ((icon == 0) || (icon == 1)) { gaim_buddy_icons_set_for_user(gc->account, who, NULL, 0); + gaim_debug_misc("yahoo", "Setting user %s's icon to NULL.\n", who); + } } } @@ -241,6 +220,28 @@ } } +void yahoo_send_picture_info(GaimConnection *gc, const char *who) +{ + struct yahoo_data *yd = gc->proto_data; + struct yahoo_packet *pkt; + char *buf; + + if (!yd->picture_url) + return; + + pkt = yahoo_packet_new(YAHOO_SERVICE_PICTURE, YAHOO_STATUS_AVAILABLE, 0); + yahoo_packet_hash(pkt, 1, gaim_connection_get_display_name(gc)); + yahoo_packet_hash(pkt, 4, gaim_connection_get_display_name(gc)); + yahoo_packet_hash(pkt, 5, who); + yahoo_packet_hash(pkt, 13, "2"); + yahoo_packet_hash(pkt, 20, yd->picture_url); + buf = g_strdup_printf("%d", yd->picture_checksum); + yahoo_packet_hash(pkt, 192, buf); + + yahoo_send_packet(yd, pkt); + yahoo_packet_free(pkt); + g_free(buf); +} void yahoo_send_picture_request(GaimConnection *gc, const char *who) {