Mercurial > pidgin.yaz
comparison libpurple/protocols/msn/slp.c @ 22888:98167ea7c093
Fix setting display picture/avatar in msnp14. Thanks to Twain28 for reporting the bug. References #1187.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Fri, 14 Mar 2008 23:41:03 +0000 |
parents | b65997110933 |
children | ac567757d236 |
comparison
equal
deleted
inserted
replaced
22887:b65997110933 | 22888:98167ea7c093 |
---|---|
261 MsnSlpMessage *slpmsg; | 261 MsnSlpMessage *slpmsg; |
262 MsnObject *obj; | 262 MsnObject *obj; |
263 char *msnobj_data; | 263 char *msnobj_data; |
264 PurpleStoredImage *img; | 264 PurpleStoredImage *img; |
265 int type; | 265 int type; |
266 char *path; | |
267 | 266 |
268 /* Send Ok */ | 267 /* Send Ok */ |
269 content = g_strdup_printf("SessionID: %lu\r\n\r\n", | 268 content = g_strdup_printf("SessionID: %lu\r\n\r\n", |
270 slpcall->session_id); | 269 slpcall->session_id); |
271 | 270 |
286 purple_debug_error("msn", "Wrong object?\n"); | 285 purple_debug_error("msn", "Wrong object?\n"); |
287 msn_object_destroy(obj); | 286 msn_object_destroy(obj); |
288 g_return_if_reached(); | 287 g_return_if_reached(); |
289 } | 288 } |
290 | 289 |
291 path = g_build_filename(purple_smileys_get_storing_dir(), | 290 if (type == MSN_OBJECT_EMOTICON) { |
292 obj->location, NULL); | 291 char *path; |
292 path = g_build_filename(purple_smileys_get_storing_dir(), | |
293 obj->location, NULL); | |
294 img = purple_imgstore_new_from_file(path); | |
295 g_free(path); | |
296 } else { | |
297 img = msn_object_get_image(obj); | |
298 if (img) | |
299 purple_imgstore_ref(img); | |
300 } | |
293 msn_object_destroy(obj); | 301 msn_object_destroy(obj); |
294 img = purple_imgstore_new_from_file(path); | 302 |
295 g_free(path); | |
296 if (img == NULL) | 303 if (img == NULL) |
297 { | 304 { |
298 purple_debug_error("msn", "Wrong object.\n"); | 305 purple_debug_error("msn", "Wrong object.\n"); |
299 g_return_if_reached(); | 306 g_return_if_reached(); |
300 } | 307 } |