pidgin: 9ffac1a1: Don't log an error when parsing vcard da...

markdoliner at pidgin.im markdoliner at pidgin.im
Mon Nov 17 21:05:34 EST 2008


-----------------------------------------------------------------
Revision: 9ffac1a19695cb6a4ed024bc6951cae029d6daaf
Ancestor: 12da6c48a8a6a51d2daf1a7e5bcd53a51440ed7f
Author: markdoliner at pidgin.im
Date: 2008-11-18T02:00:48
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/9ffac1a19695cb6a4ed024bc6951cae029d6daaf

Modified files:
        libpurple/protocols/jabber/parser.c

ChangeLog: 

Don't log an error when parsing vcard data.  Also, these messages
apparently have newlines at the end of them, so don't add one
ourselves.

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/parser.c	c6ff50a2468313d3a6d982b7bd324e280fb92c20
+++ libpurple/protocols/jabber/parser.c	4162af27cebfbf86a7d1ee4c74e0cba442391640
@@ -137,8 +137,16 @@ jabber_parser_structured_error_handler(v
 {
 	JabberStream *js = user_data;
 
+	if (error->level == XML_ERR_WARNING && error->message != NULL
+			&& strcmp(error->message, "xmlns: URI vcard-temp is not absolute\n") == 0)
+		/*
+		 * This message happens when parsing vcards, and is normal, so don't
+		 * bother logging it because people scare easily.
+		 */
+		return;
+
 	purple_debug_error("jabber", "XML parser error for JabberStream %p: "
-								 "Domain %i, code %i, level %i: %s\n",
+								 "Domain %i, code %i, level %i: %s",
 					   js,
 					   error->domain, error->code, error->level,
 					   (error->message ? error->message : "(null)"));


More information about the Commits mailing list