Invalidate old oscar icons when someone clears their icon.

Wed, 26 Sep 2007 07:57:14 +0000

author
Mark Doliner <markdoliner@pidgin.im>
date
Wed, 26 Sep 2007 07:57:14 +0000
changeset 20722
1e5508c9b082
parent 20721
202727d8b876
child 20724
e751d64f3b01

Invalidate old oscar icons when someone clears their icon.
Fixes #765.

libpurple/protocols/oscar/family_auth.c file | annotate | diff | comparison | revisions
libpurple/protocols/oscar/oscar.c file | annotate | diff | comparison | revisions
--- a/libpurple/protocols/oscar/family_auth.c	Wed Sep 26 07:35:01 2007 +0000
+++ b/libpurple/protocols/oscar/family_auth.c	Wed Sep 26 07:57:14 2007 +0000
@@ -438,10 +438,6 @@
  * login request instead of the normal SNAC one.
  *
  * As soon as AOL makes ICQ log in the same way as AIM, this is /gone/.
- *
- * XXX This may cause problems if the client relies on callbacks only
- * being called from the context of aim_rxdispatch()...
- *
  */
 static int
 goddamnicq(OscarData *od, FlapConnection *conn, const char *sn)
--- a/libpurple/protocols/oscar/oscar.c	Wed Sep 26 07:35:01 2007 +0000
+++ b/libpurple/protocols/oscar/oscar.c	Wed Sep 26 07:57:14 2007 +0000
@@ -1873,6 +1873,10 @@
 			saved_b16 = purple_buddy_icons_get_checksum_for_user(b);
 
 		if (!b16 || !saved_b16 || strcmp(b16, saved_b16)) {
+			/* Invalidate the old icon for this user */
+			purple_buddy_icons_set_for_user(account, info->sn, NULL, 0, NULL);
+
+			/* Fetch the new icon (if we're not already doing so) */
 			if (g_slist_find_custom(od->requesticon, info->sn,
 					(GCompareFunc)aim_sncmp) == NULL)
 			{

mercurial