im.pidgin.pidgin.custom_smiley: ed4d097cef855179282cf0b8a45f6e670d407c15

sadrul at pidgin.im sadrul at pidgin.im
Fri Mar 14 19:40:38 EDT 2008


-----------------------------------------------------------------
Revision: ed4d097cef855179282cf0b8a45f6e670d407c15
Ancestor: 75e04b225965ca0ce88f89f2d921acb4ecd6dd58
Author: sadrul at pidgin.im
Date: 2008-03-14T23:41:03
Branch: im.pidgin.pidgin.custom_smiley
URL: http://d.pidgin.im/viewmtn/revision/info/ed4d097cef855179282cf0b8a45f6e670d407c15

Modified files:
        libpurple/protocols/msn/slp.c

ChangeLog: 

Fix setting display picture/avatar in msnp14. Thanks to Twain28 for reporting the bug. References #1187.

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/slp.c	20fcaf3c3554ce7c09d7848737aa5e4f091bcd6e
+++ libpurple/protocols/msn/slp.c	929bf2035e77ddcc32e73699859c0fee4943fa5e
@@ -263,7 +263,6 @@ got_sessionreq(MsnSlpCall *slpcall, cons
 		char *msnobj_data;
 		PurpleStoredImage *img;
 		int type;
-		char *path;
 
 		/* Send Ok */
 		content = g_strdup_printf("SessionID: %lu\r\n\r\n",
@@ -288,11 +287,19 @@ got_sessionreq(MsnSlpCall *slpcall, cons
 			g_return_if_reached();
 		}
 
-		path = g_build_filename(purple_smileys_get_storing_dir(),
-				obj->location, NULL);
+		if (type == MSN_OBJECT_EMOTICON) {
+			char *path;
+			path = g_build_filename(purple_smileys_get_storing_dir(),
+					obj->location, NULL);
+			img = purple_imgstore_new_from_file(path);
+			g_free(path);
+		} else {
+			img = msn_object_get_image(obj);
+			if (img)
+				purple_imgstore_ref(img);
+		}
 		msn_object_destroy(obj);
-		img = purple_imgstore_new_from_file(path);
-		g_free(path);
+
 		if (img == NULL)
 		{
 			purple_debug_error("msn", "Wrong object.\n");


More information about the Commits mailing list