Mercurial > pidgin
changeset 23955:afdbb628fd17
merge of '0394d7df6e47a5fa45b9a961d47614562888683e'
and '6654fd8eb28f8fffb305c9901bfe4185c1b4c883'
author | Evan Schoenberg <evan.s@dreskin.net> |
---|---|
date | Sat, 23 Aug 2008 17:40:26 +0000 |
parents | 08c50482d5a2 (diff) 792e24788644 (current diff) |
children | 857e15555815 |
files | |
diffstat | 1 files changed, 4 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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"));