diff src/protocols/oscar/oscar.c @ 8363:19459d9eead2

[gaim-migrate @ 9088] Nice patch from nosnilmot to make AIM icons work better. My testing made me realize 2 things still don't work well: Gaim doesn't clear icons when someone else sets their icon to nothing Gaim doesn't show some icons. Maybe the official ones? With the shorter, constant checksum thing? committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 28 Feb 2004 22:45:34 +0000
parents 8ef2f2043902
children 6995abd533f5
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c	Sat Feb 28 21:14:51 2004 +0000
+++ b/src/protocols/oscar/oscar.c	Sat Feb 28 22:45:34 2004 +0000
@@ -3616,7 +3616,7 @@
 		struct stat st;
 		const char *iconfile = gaim_account_get_buddy_icon(gaim_connection_get_account(gc));
 		if (iconfile == NULL) {
-			/* Set an empty icon, or something */
+			aim_ssi_delicon(od->sess);
 		} else if (!stat(iconfile, &st)) {
 			char *buf = g_malloc(st.st_size);
 			FILE *file = fopen(iconfile, "rb");
@@ -5792,7 +5792,7 @@
 					struct stat st;
 					const char *iconfile = gaim_account_get_buddy_icon(gaim_connection_get_account(gc));
 					if (iconfile == NULL) {
-						/* Set an empty icon, or something */
+						aim_ssi_delicon(od->sess);
 					} else if (!stat(iconfile, &st)) {
 						char *buf = g_malloc(st.st_size);
 						FILE *file = fopen(iconfile, "rb");
@@ -5811,8 +5811,13 @@
 							   "Can't stat buddy icon file!\n");
 					}
 				}
-			} else if (flags == 0x81)
-				aim_ssi_seticon(od->sess, md5, length); 
+			} else if (flags == 0x81) {
+				const char *iconfile = gaim_account_get_buddy_icon(gaim_connection_get_account(gc));
+				if (iconfile == NULL)
+					aim_ssi_delicon(od->sess);
+				else
+					aim_ssi_seticon(od->sess, md5, length);
+			}
 		} break;
 
 		case 0x0002: { /* We just set an "available" message? */
@@ -6684,7 +6689,7 @@
 	struct stat st;
 
 	if (iconfile == NULL) {
-		/* Set an empty icon, or something */
+		aim_ssi_delicon(od->sess);
 	} else if (!stat(iconfile, &st)) {
 		char *buf = g_malloc(st.st_size);
 		file = fopen(iconfile, "rb");