pidgin: 263b34ad: jabber: Don't print "Extra content at th...

darkrain42 at pidgin.im darkrain42 at pidgin.im
Sun Nov 29 12:42:52 EST 2009


-----------------------------------------------------------------
Revision: 263b34adf7373694b48a494714d66824d6bb3443
Ancestor: 2c0d977aed0df2284d4d520df21a46b0f6759ac9
Author: darkrain42 at pidgin.im
Date: 2009-11-28T05:51:05
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/263b34adf7373694b48a494714d66824d6bb3443

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

ChangeLog: 

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.

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/parser.c	e6fe39f4e3b5b3e51da205ae37873758f53dc2e3
+++ libpurple/protocols/jabber/parser.c	3ebc7e996653fc26f80e716d77113fe48386e329
@@ -152,6 +152,15 @@ jabber_parser_structured_error_handler(v
 		 */
 		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,


More information about the Commits mailing list