changeset 2336:c6c5eaf69188

[gaim-migrate @ 2349] hi van committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Fri, 21 Sep 2001 00:57:13 +0000
parents 2c595fc5f1f8
children e3939d21c2f0
files src/protocols/oscar/oscar.c
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c	Fri Sep 21 00:52:54 2001 +0000
+++ b/src/protocols/oscar/oscar.c	Fri Sep 21 00:57:13 2001 +0000
@@ -1302,7 +1302,7 @@
 		ir->timestamp = args->iconstamp;
 	}
 
-	if (gc->user->iconfile && (args->icbmflags & AIM_IMFLAGS_BUDDYREQ)) {
+	if (gc->user->iconfile[0] && (args->icbmflags & AIM_IMFLAGS_BUDDYREQ)) {
 		FILE *file;
 		struct stat st;
 
@@ -1311,12 +1311,15 @@
 			file = fopen(gc->user->iconfile, "r");
 			if (file) {
 				fread(buf, 1, st.st_size, file);
+				debug_printf("Sending buddy icon to %d\n", userinfo->sn);
 				aim_send_icon(sess, conn, userinfo->sn, buf, st.st_size,
 					      st.st_mtime, aim_iconsum(buf, st.st_size));
 				fclose(file);
-			}
+			} else
+				debug_printf("Can't open buddy icon file!\n");
 			g_free(buf);
-		}
+		} else
+			debug_printf("Can't stat buddy icon file!\n");
 	}
 
 	/*
@@ -2111,7 +2114,7 @@
 				debug_printf("sending buddy icon request with message\n");
 			}
 
-			if (gc->user->iconfile && !stat(gc->user->iconfile, &st)) {
+			if (gc->user->iconfile[0] && !stat(gc->user->iconfile, &st)) {
 				FILE *file = fopen(gc->user->iconfile, "r");
 				if (file) {
 					char *buf = g_malloc(st.st_size);
@@ -2122,6 +2125,7 @@
 					args.iconstamp = st.st_mtime;
 
 					args.flags |= AIM_IMFLAGS_HASICON;
+					debug_printf("Claiming to have an icon.\n");
 
 					fclose(file);
 					g_free(buf);