# HG changeset patch # User Evan Schoenberg # Date 1219513226 0 # Node ID afdbb628fd173cadd12fec018b26f55017d6fd28 # Parent 08c50482d5a287a5b7325e00db040dcb40f5b1ff# Parent 792e2478864420c950c59f6d1bbd55bce4d084ad merge of '0394d7df6e47a5fa45b9a961d47614562888683e' and '6654fd8eb28f8fffb305c9901bfe4185c1b4c883' diff -r 792e24788644 -r afdbb628fd17 libpurple/protocols/jabber/parser.c --- a/libpurple/protocols/jabber/parser.c Fri Aug 22 21:02:51 2008 +0000 +++ b/libpurple/protocols/jabber/parser.c Sat Aug 23 17:40:26 2008 +0000 @@ -207,13 +207,11 @@ js->context = xmlCreatePushParserCtxt(&jabber_parser_libxml, js, buf, len, NULL); xmlParseChunk(js->context, "", 0, 0); } else if ((ret = xmlParseChunk(js->context, buf, len, 0)) != XML_ERR_OK) { - purple_debug_error("jabber", "xmlParseChunk returned error %i", ret); + xmlError *err = xmlCtxtGetLastError(js->context); - if ((ret >= XML_ERR_INVALID_HEX_CHARREF) && (ret <= XML_ERR_INVALID_CHAR)) { - /* If the error involves an invalid character, just drop this message. - * We'll create a new parser next time it's needed. */ - jabber_parser_free(js); - } else { + purple_debug_error("jabber", "xmlParseChunk returned error %i\n", ret); + + if (err->level == XML_ERR_FATAL) { purple_connection_error_reason (js->gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR, _("XML Parse error"));