mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-21 14:53:44 +03:00
fixed to assure user data param is set correctly when user structured
* error.c: fixed to assure user data param is set correctly when user structured error handler is called (bug 144823)
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
Sun Jul 25 14:02:24 PDT 2004 William Brack <wbrack@mmm.com.hk>
|
||||||
|
|
||||||
|
* error.c: fixed to assure user data param is set correctly
|
||||||
|
when user structured error handler is called (bug 144823)
|
||||||
|
|
||||||
Thu Jul 22 10:14:48 PDT 2004 William Brack <wbrack@mmm.com.hk>
|
Thu Jul 22 10:14:48 PDT 2004 William Brack <wbrack@mmm.com.hk>
|
||||||
|
|
||||||
* xmlreader.c: fixed problem with reader state after
|
* xmlreader.c: fixed problem with reader state after
|
||||||
|
13
error.c
13
error.c
@@ -457,8 +457,17 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel,
|
|||||||
(ctxt->sax->initialized == XML_SAX2_MAGIC))
|
(ctxt->sax->initialized == XML_SAX2_MAGIC))
|
||||||
schannel = ctxt->sax->serror;
|
schannel = ctxt->sax->serror;
|
||||||
}
|
}
|
||||||
if (schannel == NULL)
|
/*
|
||||||
|
* Check if structured error handler set
|
||||||
|
*/
|
||||||
|
if (schannel == NULL) {
|
||||||
schannel = xmlStructuredError;
|
schannel = xmlStructuredError;
|
||||||
|
/*
|
||||||
|
* if user has defined handler, change data ptr to user's choice
|
||||||
|
*/
|
||||||
|
if (schannel != NULL)
|
||||||
|
data = xmlGenericErrorContext;
|
||||||
|
}
|
||||||
if ((domain == XML_FROM_VALID) &&
|
if ((domain == XML_FROM_VALID) &&
|
||||||
((channel == xmlParserValidityError) ||
|
((channel == xmlParserValidityError) ||
|
||||||
(channel == xmlParserValidityWarning))) {
|
(channel == xmlParserValidityWarning))) {
|
||||||
@@ -541,7 +550,7 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel,
|
|||||||
xmlCopyError(to,&xmlLastError);
|
xmlCopyError(to,&xmlLastError);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Find the callback channel.
|
* Find the callback channel if channel param is NULL
|
||||||
*/
|
*/
|
||||||
if ((ctxt != NULL) && (channel == NULL) && (xmlStructuredError == NULL)) {
|
if ((ctxt != NULL) && (channel == NULL) && (xmlStructuredError == NULL)) {
|
||||||
if (level == XML_ERR_WARNING)
|
if (level == XML_ERR_WARNING)
|
||||||
|
Reference in New Issue
Block a user