changeset 9322:119f8a2c00b6

[gaim-migrate @ 10130] Move a function, and add a debug statement. committer: Tailor Script <tailor@pidgin.im>
author Tim Ringenbach <marv@pidgin.im>
date Sun, 20 Jun 2004 04:21:47 +0000
parents 542ad8b1a50f
children 59bca4e8678c
files src/protocols/yahoo/yahoo_picture.c
diffstat 1 files changed, 25 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/yahoo/yahoo_picture.c	Sun Jun 20 00:09:34 2004 +0000
+++ b/src/protocols/yahoo/yahoo_picture.c	Sun Jun 20 04:21:47 2004 +0000
@@ -62,29 +62,6 @@
 	g_free(d);
 }
 
-void yahoo_send_picture_info(GaimConnection *gc, const char *who)
-{
-	struct yahoo_data *yd = gc->proto_data;
-	struct yahoo_packet *pkt;
-	char *buf;
-
-	if (!yd->picture_url)
-		return;
-
-	pkt = yahoo_packet_new(YAHOO_SERVICE_PICTURE, YAHOO_STATUS_AVAILABLE, 0);
-	yahoo_packet_hash(pkt, 1, gaim_connection_get_display_name(gc));
-	yahoo_packet_hash(pkt, 4, gaim_connection_get_display_name(gc));
-	yahoo_packet_hash(pkt, 5, who);
-	yahoo_packet_hash(pkt, 13, "2");
-	yahoo_packet_hash(pkt, 20, yd->picture_url);
-	buf = g_strdup_printf("%d", yd->picture_checksum);
-	yahoo_packet_hash(pkt, 192, buf);
-
-	yahoo_send_packet(yd, pkt);
-	yahoo_packet_free(pkt);
-	g_free(buf);
-}
-
 void yahoo_process_picture(GaimConnection *gc, struct yahoo_packet *pkt)
 {
 	GSList *l = pkt->hash;
@@ -170,8 +147,10 @@
 	if (who) {
 		if (icon == 2)
 			yahoo_send_picture_request(gc, who);
-		else if (icon == 0)
+		else if ((icon == 0) || (icon == 1)) {
 			gaim_buddy_icons_set_for_user(gc->account, who, NULL, 0);
+			gaim_debug_misc("yahoo", "Setting user %s's icon to NULL.\n", who);
+		}
 	}
 }
 
@@ -241,6 +220,28 @@
 	}
 }
 
+void yahoo_send_picture_info(GaimConnection *gc, const char *who)
+{
+	struct yahoo_data *yd = gc->proto_data;
+	struct yahoo_packet *pkt;
+	char *buf;
+
+	if (!yd->picture_url)
+		return;
+
+	pkt = yahoo_packet_new(YAHOO_SERVICE_PICTURE, YAHOO_STATUS_AVAILABLE, 0);
+	yahoo_packet_hash(pkt, 1, gaim_connection_get_display_name(gc));
+	yahoo_packet_hash(pkt, 4, gaim_connection_get_display_name(gc));
+	yahoo_packet_hash(pkt, 5, who);
+	yahoo_packet_hash(pkt, 13, "2");
+	yahoo_packet_hash(pkt, 20, yd->picture_url);
+	buf = g_strdup_printf("%d", yd->picture_checksum);
+	yahoo_packet_hash(pkt, 192, buf);
+
+	yahoo_send_packet(yd, pkt);
+	yahoo_packet_free(pkt);
+	g_free(buf);
+}
 
 void yahoo_send_picture_request(GaimConnection *gc, const char *who)
 {