changeset 29033:61cd675b73df

jabber: Don't print "Extra content at the end of the document". This has been suggested by several people. It's papering over a possible race issue (as pointed out by wjt), but since everyone reports this as the cause of their connection problems, this is probably net better.
author Paul Aurich <paul@darkrain42.org>
date Sat, 28 Nov 2009 05:51:05 +0000
parents 31497213393c
children cfca0217d162
files libpurple/protocols/jabber/parser.c
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/parser.c	Fri Nov 27 20:52:01 2009 +0000
+++ b/libpurple/protocols/jabber/parser.c	Sat Nov 28 05:51:05 2009 +0000
@@ -152,6 +152,15 @@
 		 */
 		return;
 
+	if (error->level == XML_ERR_FATAL && error->message != NULL
+			&& strcmp(error->message, "Extra content at the end of the document\n") == 0)
+		/*
+		 * 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,