Mercurial > pidgin.yaz
diff src/protocols/oscar/oscar.c @ 11024:1d58cc6c4552
[gaim-migrate @ 12897]
sf patch #1222377, from Evan Schoenberg
"Improve buddy icon retrieval"
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 23 Jun 2005 02:24:22 +0000 |
parents | bb7fd9359f9e |
children | 50224ac8184d |
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c Wed Jun 22 23:23:14 2005 +0000 +++ b/src/protocols/oscar/oscar.c Thu Jun 23 02:24:22 2005 +0000 @@ -4632,18 +4632,23 @@ GSList *cur; va_list ap; char *sn; - fu8_t *iconcsum, *icon; + fu8_t iconcsumtype, *iconcsum, *icon; fu16_t iconcsumlen, iconlen; va_start(ap, fr); sn = va_arg(ap, char *); + iconcsumtype = va_arg(ap, int); iconcsum = va_arg(ap, fu8_t *); iconcsumlen = va_arg(ap, int); icon = va_arg(ap, fu8_t *); iconlen = va_arg(ap, int); va_end(ap); - if (iconlen > 0) { + /* + * Some AIM clients will send a blank GIF image with iconlen 90 when + * no icon is set. Ignore these. + */ + if ((iconlen > 0) && (iconlen != 90)) { char *b16; GaimBuddy *b = gaim_find_buddy(gc->account, sn); gaim_buddy_icons_set_for_user(gaim_connection_get_account(gc), @@ -4722,7 +4727,7 @@ userinfo = aim_locate_finduserinfo(od->sess, (char *)od->requesticon->data); if ((userinfo != NULL) && (userinfo->iconcsumlen > 0)) { - aim_bart_request(od->sess, od->requesticon->data, userinfo->iconcsum, userinfo->iconcsumlen); + aim_bart_request(od->sess, od->requesticon->data, userinfo->iconcsumtype, userinfo->iconcsum, userinfo->iconcsumlen); return FALSE; } else { char *sn = od->requesticon->data;