| 1822 |
1822 |
| 1823 /* Server stored icon stuff */ |
1823 /* Server stored icon stuff */ |
| 1824 if (info->iconcsumlen) { |
1824 if (info->iconcsumlen) { |
| 1825 char *b16, *saved_b16; |
1825 char *b16, *saved_b16; |
| 1826 GaimBuddy *b; |
1826 GaimBuddy *b; |
| |
1827 FILE *file; |
| 1827 |
1828 |
| 1828 b16 = tobase16(info->iconcsum, info->iconcsumlen); |
1829 b16 = tobase16(info->iconcsum, info->iconcsumlen); |
| 1829 b = gaim_find_buddy(gc->account, info->sn); |
1830 b = gaim_find_buddy(gc->account, info->sn); |
| 1830 saved_b16 = gaim_buddy_get_setting(b, "icon_checksum"); |
1831 /* If for some reason the checksum is valid, but cached file is not.. |
| |
1832 we want to know. */ |
| |
1833 if((file = fopen(gaim_buddy_get_setting(b, "buddy_icon"), "rb"))) { |
| |
1834 fclose(file); |
| |
1835 saved_b16 = gaim_buddy_get_setting(b, "icon_checksum"); |
| |
1836 } |
| |
1837 else |
| |
1838 saved_b16 = NULL; |
| |
1839 |
| 1831 if (!b16 || !saved_b16 || strcmp(b16, saved_b16)) { |
1840 if (!b16 || !saved_b16 || strcmp(b16, saved_b16)) { |
| 1832 GSList *cur = od->requesticon; |
1841 GSList *cur = od->requesticon; |
| 1833 while (cur && aim_sncmp((char *)cur->data, info->sn)) |
1842 while (cur && aim_sncmp((char *)cur->data, info->sn)) |
| 1834 cur = cur->next; |
1843 cur = cur->next; |
| 1835 if (!cur) { |
1844 if (!cur) { |