src/protocols/oscar/oscar.c

changeset 7054
b3509b4108e9
parent 7045
458b55091f8b
child 7060
717cbeb22b6d
--- a/src/protocols/oscar/oscar.c	Tue Sep 30 03:06:50 2003 +0000
+++ b/src/protocols/oscar/oscar.c	Tue Sep 30 05:36:28 2003 +0000
@@ -1824,10 +1824,19 @@
 	if (info->iconcsumlen) {
 		char *b16, *saved_b16;
 		GaimBuddy *b;
+                FILE *file;
 
 		b16 = tobase16(info->iconcsum, info->iconcsumlen);
 		b = gaim_find_buddy(gc->account, info->sn);
-		saved_b16 = gaim_buddy_get_setting(b, "icon_checksum");
+                /* If for some reason the checksum is valid, but cached file is not..
+                   we want to know. */
+                if((file = fopen(gaim_buddy_get_setting(b, "buddy_icon"), "rb"))) {
+                        fclose(file);
+                        saved_b16 = gaim_buddy_get_setting(b, "icon_checksum");
+                }
+                else
+                        saved_b16 = NULL;
+
 		if (!b16 || !saved_b16 || strcmp(b16, saved_b16)) {
 			GSList *cur = od->requesticon;
 			while (cur && aim_sncmp((char *)cur->data, info->sn))

mercurial