comparison libpurple/protocols/silc/buddy.c @ 16475:5e47b3427b28

propagate from branch 'im.pidgin.rlaager.gaim_migration' (head dcc40d46afbe3f87cc674e4fb1526ac722bc35cb) to branch 'im.pidgin.pidgin' (head 0ef5b6c44115778e329fd628324124f872f5253b)
author Sean Egan <seanegan@gmail.com>
date Fri, 27 Apr 2007 02:14:44 +0000
parents a5176db228b7 24bbd7e46bfe
children 6c3b44ac71f3
comparison
equal deleted inserted replaced
16464:b2044e10915a 16475:5e47b3427b28
986 !strcmp(type, "image/png")) { 986 !strcmp(type, "image/png")) {
987 const unsigned char *data; 987 const unsigned char *data;
988 SilcUInt32 data_len; 988 SilcUInt32 data_len;
989 data = silc_mime_get_data(m, &data_len); 989 data = silc_mime_get_data(m, &data_len);
990 if (data) 990 if (data)
991 purple_buddy_icons_set_for_user(purple_buddy_get_account(r->b), purple_buddy_get_name(r->b), (void *)data, data_len); 991 purple_buddy_icons_set_for_user(purple_buddy_get_account(r->b), purple_buddy_get_name(r->b), g_memdup(data, data_len), data_len);
992 } 992 }
993 silc_mime_free(m); 993 silc_mime_free(m);
994 } 994 }
995 } 995 }
996 #endif 996 #endif
1719 g_free(ic.data); 1719 g_free(ic.data);
1720 return; 1720 return;
1721 } 1721 }
1722 1722
1723 t = purple_buddy_icon_get_type((const PurpleBuddyIcon *)&ic); 1723 t = purple_buddy_icon_get_type((const PurpleBuddyIcon *)&ic);
1724 if (!t) { 1724 if (!t || !strcmp(t, "icon")) {
1725 g_free(ic.data); 1725 g_free(ic.data);
1726 silc_mime_free(mime); 1726 silc_mime_free(mime);
1727 return; 1727 return;
1728 } 1728 }
1729 if (!strcmp(t, "jpg")) 1729 if (!strcmp(t, "jpg"))