changeset 27192:291724375feb

If there's no vCard on the server, we have to be able to set ours. Allows bootstrapping a new account with (at least) Prosody.
author Paul Aurich <paul@darkrain42.org>
date Sat, 27 Jun 2009 17:46:49 +0000
parents 7d4eb0834107
children 916f266aca98
files libpurple/protocols/jabber/buddy.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/buddy.c	Sat Jun 27 17:31:33 2009 +0000
+++ b/libpurple/protocols/jabber/buddy.c	Sat Jun 27 17:46:49 2009 +0000
@@ -1102,8 +1102,12 @@
 	char *txt, *vcard_hash = NULL;
 
 	if (type == JABBER_IQ_ERROR) {
+		xmlnode *error;
 		purple_debug_warning("jabber", "Server returned error while retrieving vCard\n");
-		return;
+
+		error = xmlnode_get_child(packet, "error");
+		if (!error || !xmlnode_get_child(error, "item-not-found"))
+			return;
 	}
 
 	if((vcard = xmlnode_get_child(packet, "vCard")) ||