diff libpurple/protocols/msn/msn.c @ 25469:fd6c3dc4641f

propagate from branch 'im.pidgin.pidgin' (head f11ff4f3f5929845b5a51662b200df16da7e550f) to branch 'im.pidgin.pidgin.yaz' (head 9925ec484dc5ac489c78817cdab384b16b6e4ed0)
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Sat, 28 Apr 2007 03:53:00 +0000
parents bf77cf06b082 5e47b3427b28
children fb4df531105b
line wrap: on
line diff
--- a/libpurple/protocols/msn/msn.c	Thu Apr 26 21:15:41 2007 +0000
+++ b/libpurple/protocols/msn/msn.c	Sat Apr 28 03:53:00 2007 +0000
@@ -1310,7 +1310,7 @@
 }
 
 static void
-msn_set_buddy_icon(PurpleConnection *gc, const char *filename)
+msn_set_buddy_icon(PurpleConnection *gc, PurpleStoredImage *img)
 {
 	MsnSession *session;
 	MsnUser *user;
@@ -1318,7 +1318,7 @@
 	session = gc->proto_data;
 	user = session->user;
 
-	msn_user_set_buddy_icon(user, filename);
+	msn_user_set_buddy_icon(user, img);
 
 	msn_change_status(session);
 }
@@ -1889,7 +1889,7 @@
 		{
 			char buf[1024];
 			purple_debug_info("msn", "%s is %d bytes\n", photo_url_text, len);
-			id = purple_imgstore_add(url_text, len, NULL);
+			id = purple_imgstore_add_with_id(g_memdup(url_text, len), len, NULL);
 			g_snprintf(buf, sizeof(buf), "<img id=\"%d\"><br>", id);
 			purple_notify_user_info_prepend_pair(user_info, NULL, buf);
 		}
@@ -1908,7 +1908,7 @@
 	g_free(photo_url_text);
 	g_free(info2_data);
 	if (id != -1)
-		purple_imgstore_unref(id);
+		purple_imgstore_unref_by_id(id);
 #endif
 }