changeset 16519:ecfb07301611

Re-add the Jabber error checking part of 2f959ba8a0fdac370ac610e60f6a4cd09525d928. This is why it's important to commit things separately.
author Richard Laager <rlaager@wiktel.com>
date Fri, 27 Apr 2007 14:27:48 +0000
parents 403332494b92
children e7d820a42bf8
files libpurple/protocols/jabber/buddy.c
diffstat 1 files changed, 15 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- 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,
-								"<b>%s:</b> <img id='%d'><br/>",
-								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,
+							"<b>%s:</b> <img id='%d'><br/>",
+							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);