Mercurial > pidgin.yaz
diff libpurple/protocols/yahoo/yahoo_picture.c @ 17054:6ec8bae7d98a
Patch #1038. Fix receiving of Yahoo buddy icons. Thanks, vampire!
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Wed, 23 May 2007 23:13:11 +0000 |
parents | 34618fedf5b9 |
children | 16bdcffb1c62 |
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/yahoo_picture.c Wed May 23 22:34:19 2007 +0000 +++ b/libpurple/protocols/yahoo/yahoo_picture.c Wed May 23 23:13:11 2007 +0000 @@ -157,7 +157,10 @@ case 5: /* us */ break; + /* NOTE: currently the server seems to only send 213; 206 was used + * in older versions. Check whether it's still needed. */ case 206: + case 213: icon = strtol(pair->value, NULL, 10); break; } @@ -205,9 +208,11 @@ const char *locksum = NULL; /* FIXME: Cleanup this strtol() stuff if possible. */ - if (b && (locksum = purple_buddy_icons_get_checksum_for_user(b)) != NULL && - (checksum != strtol(locksum, NULL, 10))) - yahoo_send_picture_request(gc, who); + if (b) { + locksum = purple_buddy_icons_get_checksum_for_user(b); + if (!locksum || (checksum != strtol(locksum, NULL, 10))) + yahoo_send_picture_request(gc, who); + } } }