Diff for /embedaddon/libxml2/error.c between versions 1.1.1.1 and 1.1.1.2

version 1.1.1.1, 2012/02/21 23:37:58 version 1.1.1.2, 2013/07/22 01:22:22
Line 452  __xmlRaiseError(xmlStructuredErrorFunc schannel, Line 452  __xmlRaiseError(xmlStructuredErrorFunc schannel,
     xmlErrorPtr to = &xmlLastError;      xmlErrorPtr to = &xmlLastError;
     xmlNodePtr baseptr = NULL;      xmlNodePtr baseptr = NULL;
   
       if (code == XML_ERR_OK)
           return;
     if ((xmlGetWarningsDefaultValue == 0) && (level == XML_ERR_WARNING))      if ((xmlGetWarningsDefaultValue == 0) && (level == XML_ERR_WARNING))
         return;          return;
     if ((domain == XML_FROM_PARSER) || (domain == XML_FROM_HTML) ||      if ((domain == XML_FROM_PARSER) || (domain == XML_FROM_HTML) ||
Line 459  __xmlRaiseError(xmlStructuredErrorFunc schannel, Line 461  __xmlRaiseError(xmlStructuredErrorFunc schannel,
         (domain == XML_FROM_IO) || (domain == XML_FROM_VALID)) {          (domain == XML_FROM_IO) || (domain == XML_FROM_VALID)) {
         ctxt = (xmlParserCtxtPtr) ctx;          ctxt = (xmlParserCtxtPtr) ctx;
         if ((schannel == NULL) && (ctxt != NULL) && (ctxt->sax != NULL) &&          if ((schannel == NULL) && (ctxt != NULL) && (ctxt->sax != NULL) &&
            (ctxt->sax->initialized == XML_SAX2_MAGIC))            (ctxt->sax->initialized == XML_SAX2_MAGIC) &&
             (ctxt->sax->serror != NULL)) {
             schannel = ctxt->sax->serror;              schannel = ctxt->sax->serror;
               data = ctxt->userData;
           }
     }      }
     /*      /*
      * Check if structured error handler set       * Check if structured error handler set
Line 473  __xmlRaiseError(xmlStructuredErrorFunc schannel, Line 478  __xmlRaiseError(xmlStructuredErrorFunc schannel,
         if (schannel != NULL)          if (schannel != NULL)
             data = xmlStructuredErrorContext;              data = xmlStructuredErrorContext;
     }      }
     if ((domain == XML_FROM_VALID) &&  
         ((channel == xmlParserValidityError) ||  
          (channel == xmlParserValidityWarning))) {  
         ctxt = (xmlParserCtxtPtr) ctx;  
         if ((schannel == NULL) && (ctxt != NULL) && (ctxt->sax != NULL) &&  
             (ctxt->sax->initialized == XML_SAX2_MAGIC))  
             schannel = ctxt->sax->serror;  
     }  
     if (code == XML_ERR_OK)  
         return;  
     /*      /*
      * Formatting the message       * Formatting the message
      */       */
Line 589  __xmlRaiseError(xmlStructuredErrorFunc schannel, Line 584  __xmlRaiseError(xmlStructuredErrorFunc schannel,
     if (to != &xmlLastError)      if (to != &xmlLastError)
         xmlCopyError(to,&xmlLastError);          xmlCopyError(to,&xmlLastError);
   
       if (schannel != NULL) {
           schannel(data, to);
           return;
       }
   
     /*      /*
      * Find the callback channel if channel param is NULL       * Find the callback channel if channel param is NULL
      */       */
Line 600  __xmlRaiseError(xmlStructuredErrorFunc schannel, Line 600  __xmlRaiseError(xmlStructuredErrorFunc schannel,
             channel = ctxt->sax->error;              channel = ctxt->sax->error;
         data = ctxt->userData;          data = ctxt->userData;
     } else if (channel == NULL) {      } else if (channel == NULL) {
        if ((schannel == NULL) && (xmlStructuredError != NULL)) {        channel = xmlGenericError;
            schannel = xmlStructuredError;        if (!data)
            data = xmlStructuredErrorContext;            data = xmlGenericErrorContext;
        } else { 
            channel = xmlGenericError; 
            if (!data) { 
                data = xmlGenericErrorContext; 
            } 
        } 
    } 
    if (schannel != NULL) { 
        schannel(data, to); 
        return; 
     }      }
     if (channel == NULL)      if (channel == NULL)
         return;          return;

Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.2


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>