comparison 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
comparison
equal deleted inserted replaced
18240:bc4518599c10 18257:6050348614ab
417 unsigned char hashval[20]; 417 unsigned char hashval[20];
418 char *p, hash[41]; 418 char *p, hash[41];
419 419
420 avatar_data = purple_imgstore_get_data(img); 420 avatar_data = purple_imgstore_get_data(img);
421 avatar_len = purple_imgstore_get_size(img); 421 avatar_len = purple_imgstore_get_size(img);
422 /* have to get rid of the old PHOTO if it exists */
423 if((photo = xmlnode_get_child(vc_node, "PHOTO"))) {
424 xmlnode_free(photo);
425 }
422 photo = xmlnode_new_child(vc_node, "PHOTO"); 426 photo = xmlnode_new_child(vc_node, "PHOTO");
423 binval = xmlnode_new_child(photo, "BINVAL"); 427 binval = xmlnode_new_child(photo, "BINVAL");
424 enc = purple_base64_encode(avatar_data, avatar_len); 428 enc = purple_base64_encode(avatar_data, avatar_len);
425 429
426 purple_cipher_digest_region("sha1", avatar_data, 430 purple_cipher_digest_region("sha1", avatar_data,