libpurple/protocols/jabber/presence.c

changeset 39920
f2980266abbd
parent 39897
16b440d4ab36
child 40052
cc03b5af25ea
equal deleted inserted replaced
39919:1d0ce288ca30 39920:f2980266abbd
458 if ((binval = purple_xmlnode_get_child(photo, "BINVAL")) && 458 if ((binval = purple_xmlnode_get_child(photo, "BINVAL")) &&
459 (text = purple_xmlnode_get_data(binval))) { 459 (text = purple_xmlnode_get_data(binval))) {
460 data = g_base64_decode(text, &size); 460 data = g_base64_decode(text, &size);
461 g_free(text); 461 g_free(text);
462 462
463 if (data) 463 if (data) {
464 g_compute_checksum_for_data( 464 hash = g_compute_checksum_for_data(G_CHECKSUM_SHA1, data,
465 G_CHECKSUM_SHA1, data, size); 465 size);
466 }
466 } 467 }
467 468
468 purple_buddy_icons_set_for_user(purple_connection_get_account(js->gc), from, data, size, hash); 469 purple_buddy_icons_set_for_user(purple_connection_get_account(js->gc), from, data, size, hash);
469 470
470 g_free(hash); 471 g_free(hash);

mercurial