# HG changeset patch # User Tim Ringenbach # Date 1087717120 0 # Node ID f40233043b5ae2fd554b77b514496a15606d0f9c # Parent af707cc1e229c485553f66baa9f57eebaaeec144 [gaim-migrate @ 10133] This fixes some oddities with fetching a users icon if he had previously unset it, and then set the same one. We were forgetting to unset some flags and also the checksum, so we noticed the checksum was the same and didn't ask for the icon, even though we didn't have an icon. Its still not always fetching it, which is odd. committer: Tailor Script diff -r af707cc1e229 -r f40233043b5a src/protocols/yahoo/yahoo.c --- a/src/protocols/yahoo/yahoo.c Sun Jun 20 06:57:54 2004 +0000 +++ b/src/protocols/yahoo/yahoo.c Sun Jun 20 07:38:40 2004 +0000 @@ -443,14 +443,20 @@ if (!name) break; + b = gaim_find_buddy(gc->account, name); + if (!cksum || (cksum == -1)) { + if (f) + yahoo_friend_set_buddy_icon_need_request(f, TRUE); gaim_buddy_icons_set_for_user(gc->account, name, NULL, 0); + if (b) + gaim_blist_node_remove_setting((GaimBlistNode *)b, YAHOO_ICON_CHECKSUM_KEY); break; } if (!f) break; - b = gaim_find_buddy(gc->account, name); + yahoo_friend_set_buddy_icon_need_request(f, FALSE); if (cksum != gaim_blist_node_get_int((GaimBlistNode*)b, YAHOO_ICON_CHECKSUM_KEY)) yahoo_send_picture_request(gc, name); diff -r af707cc1e229 -r f40233043b5a src/protocols/yahoo/yahoo_picture.c --- a/src/protocols/yahoo/yahoo_picture.c Sun Jun 20 06:57:54 2004 +0000 +++ b/src/protocols/yahoo/yahoo_picture.c Sun Jun 20 07:38:40 2004 +0000 @@ -148,7 +148,13 @@ if (icon == 2) yahoo_send_picture_request(gc, who); else if ((icon == 0) || (icon == 1)) { + GaimBuddy *b = gaim_find_buddy(gc->account, who); + YahooFriend *f; gaim_buddy_icons_set_for_user(gc->account, who, NULL, 0); + if (b) + gaim_blist_node_remove_setting((GaimBlistNode *)b, YAHOO_ICON_CHECKSUM_KEY); + if ((f = yahoo_friend_find(gc, who))) + yahoo_friend_set_buddy_icon_need_request(f, TRUE); gaim_debug_misc("yahoo", "Setting user %s's icon to NULL.\n", who); } }