# HG changeset patch # User Richard Laager # Date 1177684068 0 # Node ID ecfb073016111833148e129b9c32da53e9193e2b # Parent 403332494b92701872109300766e004986328aa8 Re-add the Jabber error checking part of 2f959ba8a0fdac370ac610e60f6a4cd09525d928. This is why it's important to commit things separately. diff -r 403332494b92 -r ecfb07301611 libpurple/protocols/jabber/buddy.c --- a/libpurple/protocols/jabber/buddy.c Fri Apr 27 13:15:09 2007 +0000 +++ b/libpurple/protocols/jabber/buddy.c Fri Apr 27 14:27:48 2007 +0000 @@ -955,23 +955,22 @@ gboolean photo = (strcmp(child->name, "PHOTO") == 0); data = purple_base64_decode(bintext, &size); - if (data) { - jbi->vcard_imgids = g_slist_prepend(jbi->vcard_imgids, GINT_TO_POINTER(purple_imgstore_add_with_id(g_memdup(data, size), size, "logo.png"))); - g_string_append_printf(info_text, - "%s:
", - photo ? _("Photo") : _("Logo"), - GPOINTER_TO_INT(jbi->vcard_imgids->data)); - - purple_cipher_digest_region("sha1", (guchar *)data, size, - sizeof(hashval), hashval, NULL); - p = hash; - for(i=0; i<20; i++, p+=2) - snprintf(p, 3, "%02x", hashval[i]); + + jbi->vcard_imgids = g_slist_prepend(jbi->vcard_imgids, GINT_TO_POINTER(purple_imgstore_add_with_id(g_memdup(data, size), size, "logo.png"))); + g_string_append_printf(info_text, + "%s:
", + photo ? _("Photo") : _("Logo"), + GPOINTER_TO_INT(jbi->vcard_imgids->data)); - purple_buddy_icons_set_for_user(js->gc->account, bare_jid, - data, size, hash); - g_free(bintext); - } + purple_cipher_digest_region("sha1", (guchar *)data, size, + sizeof(hashval), hashval, NULL); + p = hash; + for(i=0; i<20; i++, p+=2) + snprintf(p, 3, "%02x", hashval[i]); + + purple_buddy_icons_set_for_user(js->gc->account, bare_jid, + data, size, hash); + g_free(bintext); } } g_free(text);