Mercurial > pidgin.yaz
comparison libpurple/protocols/jabber/parser.c @ 27069:cd78ea46e9bd
merge of '7c614b09b72037ebd86c03fbbeac7794a155547b'
and 'af18689b86389686230fc6ce83cbba52690ce0cb'
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Sat, 30 May 2009 00:32:50 +0000 |
parents | 42bff519973b a25d09019b9b |
children | 01f1929d0936 |
comparison
equal
deleted
inserted
replaced
27068:42bff519973b | 27069:cd78ea46e9bd |
---|---|
224 * parser, so do a ParseChunk right afterwards to force it. */ | 224 * parser, so do a ParseChunk right afterwards to force it. */ |
225 js->context = xmlCreatePushParserCtxt(&jabber_parser_libxml, js, buf, len, NULL); | 225 js->context = xmlCreatePushParserCtxt(&jabber_parser_libxml, js, buf, len, NULL); |
226 xmlParseChunk(js->context, "", 0, 0); | 226 xmlParseChunk(js->context, "", 0, 0); |
227 } else if ((ret = xmlParseChunk(js->context, buf, len, 0)) != XML_ERR_OK) { | 227 } else if ((ret = xmlParseChunk(js->context, buf, len, 0)) != XML_ERR_OK) { |
228 xmlError *err = xmlCtxtGetLastError(js->context); | 228 xmlError *err = xmlCtxtGetLastError(js->context); |
229 | 229 /* |
230 switch (err->level) { | 230 * libxml2 uses a global setting to determine whether or not to store |
231 * warnings. Other libraries may set this, which causes err to be | |
232 * NULL. See #8136 for details. | |
233 */ | |
234 xmlErrorLevel level = XML_ERR_WARNING; | |
235 | |
236 if (err) | |
237 level = err->level; | |
238 | |
239 switch (level) { | |
231 case XML_ERR_NONE: | 240 case XML_ERR_NONE: |
232 purple_debug_info("jabber", "xmlParseChunk returned info %i\n", ret); | 241 purple_debug_info("jabber", "xmlParseChunk returned info %i\n", ret); |
233 break; | 242 break; |
234 case XML_ERR_WARNING: | 243 case XML_ERR_WARNING: |
235 purple_debug_warning("jabber", "xmlParseChunk returned warning %i\n", ret); | 244 purple_debug_warning("jabber", "xmlParseChunk returned warning %i\n", ret); |