libpurple/protocols/jabber/parser.c

branch
cpw.darkrain42.xmpp.scram
changeset 29026
72f3f28da29c
parent 28855
c5bc85f9c00e
parent 29025
2fdb2a69fb66
child 29085
b2ddb2f7bfb9
--- a/libpurple/protocols/jabber/parser.c	Fri Nov 27 20:41:22 2009 +0000
+++ b/libpurple/protocols/jabber/parser.c	Mon Nov 30 02:44:03 2009 +0000
@@ -145,13 +145,22 @@
 	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)
+			&& g_str_equal(error->message, "xmlns: URI vcard-temp is not absolute\n"))
 		/*
 		 * This message happens when parsing vcards, and is normal, so don't
 		 * bother logging it because people scare easily.
 		 */
 		return;
 
+	if (error->level == XML_ERR_FATAL && error->message != NULL
+			&& g_str_equal(error->message, "Extra content at the end of the document\n"))
+		/*
+		 * This is probably more annoying than the vcard-temp error; it occurs
+		 * because we disconnect in most cases without waiting for the receiving
+		 * </stream:stream> (limitations of libpurple)
+		 */
+		return;
+
 	purple_debug_error("jabber", "XML parser error for JabberStream %p: "
 								 "Domain %i, code %i, level %i: %s",
 					   js,

mercurial