Mercurial > pidgin
diff libpurple/protocols/jabber/buddy.c @ 18257:6050348614ab
fix a buddy icon bug in jabber
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Sat, 23 Jun 2007 21:22:56 +0000 |
parents | 703872bf33c6 |
children | 5c1ed6296b56 44b4e8bd759b ab8099bcc9ba |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/buddy.c Sat Jun 23 06:32:09 2007 +0000 +++ b/libpurple/protocols/jabber/buddy.c Sat Jun 23 21:22:56 2007 +0000 @@ -419,6 +419,10 @@ avatar_data = purple_imgstore_get_data(img); avatar_len = purple_imgstore_get_size(img); + /* have to get rid of the old PHOTO if it exists */ + if((photo = xmlnode_get_child(vc_node, "PHOTO"))) { + xmlnode_free(photo); + } photo = xmlnode_new_child(vc_node, "PHOTO"); binval = xmlnode_new_child(photo, "BINVAL"); enc = purple_base64_encode(avatar_data, avatar_len);