ALT Linux Bugzilla
– Attachment 4733 Details for
Bug 24379
xmlSetStructuredErrorFunc() breaks SAX2 error handler
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
libxml-error.patch
libxml-error.patch (text/plain), 1.97 KB, created by
Alexey Gladkov
on 2011-01-03 01:14:40 MSK
(
hide
)
Description:
libxml-error.patch
Filename:
MIME Type:
Creator:
Alexey Gladkov
Created:
2011-01-03 01:14:40 MSK
Size:
1.97 KB
patch
obsolete
>diff --git a/error.c b/error.c >index 7508d41..deda40c 100644 >--- a/error.c >+++ b/error.c >@@ -459,8 +459,11 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel, > (domain == XML_FROM_IO) || (domain == XML_FROM_VALID)) { > ctxt = (xmlParserCtxtPtr) ctx; > if ((schannel == NULL) && (ctxt != NULL) && (ctxt->sax != NULL) && >- (ctxt->sax->initialized == XML_SAX2_MAGIC)) >+ (ctxt->sax->initialized == XML_SAX2_MAGIC)) { > schannel = ctxt->sax->serror; >+ if (schannel) >+ data = ctxt->userData; >+ } > } > /* > * Check if structured error handler set >@@ -473,14 +476,6 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel, > if (schannel != NULL) > 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; > /* >@@ -589,6 +584,11 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel, > if (to != &xmlLastError) > xmlCopyError(to,&xmlLastError); > >+ if (schannel != NULL) { >+ schannel(data, to); >+ return; >+ } >+ > /* > * Find the callback channel if channel param is NULL > */ >@@ -600,19 +600,9 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel, > channel = ctxt->sax->error; > data = ctxt->userData; > } else if (channel == NULL) { >- if ((schannel == NULL) && (xmlStructuredError != NULL)) { >- schannel = xmlStructuredError; >- data = xmlStructuredErrorContext; >- } else { >- channel = xmlGenericError; >- if (!data) { >- data = xmlGenericErrorContext; >- } >- } >- } >- if (schannel != NULL) { >- schannel(data, to); >- return; >+ channel = xmlGenericError; >+ if (!data) >+ data = xmlGenericErrorContext; > } > if (channel == NULL) > return;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 24379
:
4726
|
4728
|
4731
|
4732
| 4733 |
4742