~ubuntu-branches/ubuntu/intrepid/pidgin/intrepid-proposed

« back to all changes in this revision

Viewing changes to libpurple/protocols/jabber/parser.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2008-09-16 22:13:07 UTC
  • mto: This revision was merged to the branch mainline in revision 28.
  • Revision ID: james.westby@ubuntu.com-20080916221307-plkfuu6a8of5ocr3
Tags: upstream-2.5.1
ImportĀ upstreamĀ versionĀ 2.5.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
207
207
                js->context = xmlCreatePushParserCtxt(&jabber_parser_libxml, js, buf, len, NULL);
208
208
                xmlParseChunk(js->context, "", 0, 0);
209
209
        } else if ((ret = xmlParseChunk(js->context, buf, len, 0)) != XML_ERR_OK) {
210
 
                purple_debug_error("jabber", "xmlParseChunk returned error %i", ret);
211
 
 
212
 
                if ((ret >= XML_ERR_INVALID_HEX_CHARREF) && (ret <= XML_ERR_INVALID_CHAR)) {
213
 
                        /* If the error involves an invalid character, just drop this message.
214
 
                         * We'll create a new parser next time it's needed. */
215
 
                        jabber_parser_free(js);
216
 
                } else {
 
210
                xmlError *err = xmlCtxtGetLastError(js->context);
 
211
 
 
212
                purple_debug_error("jabber", "xmlParseChunk returned error %i\n", ret);
 
213
 
 
214
                if (err->level == XML_ERR_FATAL) {
217
215
                        purple_connection_error_reason (js->gc,
218
216
                                PURPLE_CONNECTION_ERROR_NETWORK_ERROR,
219
217
                                _("XML Parse error"));