| 392 |
392 |
| 393 photo = xmlnode_new_child(vc_node, "PHOTO"); |
393 photo = xmlnode_new_child(vc_node, "PHOTO"); |
| 394 binval = xmlnode_new_child(photo, "BINVAL"); |
394 binval = xmlnode_new_child(photo, "BINVAL"); |
| 395 enc = gaim_base64_encode(avatar_data, avatar_len); |
395 enc = gaim_base64_encode(avatar_data, avatar_len); |
| 396 |
396 |
| 397 gaim_cipher_digest_region("sha1", (guint8 *)avatar_data, |
397 gaim_cipher_digest_region("sha1", (guchar *)avatar_data, |
| 398 avatar_len, sizeof(hashval), |
398 avatar_len, sizeof(hashval), |
| 399 hashval, NULL); |
399 hashval, NULL); |
| 400 |
400 |
| 401 p = hash; |
401 p = hash; |
| 402 for(i=0; i<20; i++, p+=2) |
402 for(i=0; i<20; i++, p+=2) |
| 825 GPOINTER_TO_INT(imgids->data)); |
825 GPOINTER_TO_INT(imgids->data)); |
| 826 |
826 |
| 827 gaim_buddy_icons_set_for_user(js->gc->account, bare_jid, |
827 gaim_buddy_icons_set_for_user(js->gc->account, bare_jid, |
| 828 data, size); |
828 data, size); |
| 829 |
829 |
| 830 gaim_cipher_digest_region("sha1", (guint8 *)data, size, |
830 gaim_cipher_digest_region("sha1", (guchar *)data, size, |
| 831 sizeof(hashval), hashval, NULL); |
831 sizeof(hashval), hashval, NULL); |
| 832 p = hash; |
832 p = hash; |
| 833 for(i=0; i<20; i++, p+=2) |
833 for(i=0; i<20; i++, p+=2) |
| 834 snprintf(p, 3, "%02x", hashval[i]); |
834 snprintf(p, 3, "%02x", hashval[i]); |
| 835 gaim_blist_node_set_string((GaimBlistNode*)b, "avatar_hash", hash); |
835 gaim_blist_node_set_string((GaimBlistNode*)b, "avatar_hash", hash); |