If the cached buddy icon can't be loaded, delete the preferences which point to it. Among other things, this fixes OSCAR buddy icon retrieval when the cache has been removed - since previously the icon hash was kept around and was used to determine that (so far as the prpl could tell) no icon retrieval was needed, libpurple would never have an icon for the contact.

Mon, 07 Jan 2008 00:32:26 +0000

author
Evan Schoenberg <evands@pidgin.im>
date
Mon, 07 Jan 2008 00:32:26 +0000
changeset 22148
66b0ed947da5
parent 22146
c1fb24f33a22
child 22149
cb2f17970a07

If the cached buddy icon can't be loaded, delete the preferences which point to it. Among other things, this fixes OSCAR buddy icon retrieval when the cache has been removed - since previously the icon hash was kept around and was used to determine that (so far as the prpl could tell) no icon retrieval was needed, libpurple would never have an icon for the contact.

libpurple/buddyicon.c file | annotate | diff | comparison | revisions
--- a/libpurple/buddyicon.c	Sun Jan 06 20:59:02 2008 +0000
+++ b/libpurple/buddyicon.c	Mon Jan 07 00:32:26 2008 +0000
@@ -614,6 +614,10 @@
 				checksum = purple_blist_node_get_string((PurpleBlistNode*)b, "icon_checksum");
 				purple_buddy_icon_set_data(icon, data, len, checksum);
 			}
+			else
+			{
+				delete_buddy_icon_settings((PurpleBlistNode*)b, "buddy_icon");
+			}
 			g_free(path);
 		}
 

mercurial