Blame SOURCES/libxml2-xmlStopParser-reset-errNo.patch

6dedca
From 5b3397ee81277ed70af58a247a0d731de9c7a6c7 Mon Sep 17 00:00:00 2001
6dedca
From: Daniel Veillard <veillard@redhat.com>
6dedca
Date: Mon, 9 Nov 2015 18:16:00 +0800
6dedca
Subject: [PATCH] xmlStopParser reset errNo
6dedca
To: libvir-list@redhat.com
6dedca
6dedca
I had used it in contexts where that information ought to be preserved
6dedca
6dedca
Signed-off-by: Daniel Veillard <veillard@redhat.com>
6dedca
---
6dedca
 parser.c | 3 +++
6dedca
 1 file changed, 3 insertions(+)
6dedca
6dedca
diff --git a/parser.c b/parser.c
6dedca
index 134ea7f..a58dda3 100644
6dedca
--- a/parser.c
6dedca
+++ b/parser.c
6dedca
@@ -6762,6 +6762,7 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
6dedca
 	if (RAW != '[') {
6dedca
 	    xmlFatalErr(ctxt, XML_ERR_CONDSEC_INVALID, NULL);
6dedca
 	    xmlStopParser(ctxt);
6dedca
+	    ctxt->errNo = XML_ERR_CONDSEC_INVALID;
6dedca
 	    return;
6dedca
 	} else {
6dedca
 	    if (ctxt->input->id != id) {
6dedca
@@ -6824,6 +6825,7 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
6dedca
 	if (RAW != '[') {
6dedca
 	    xmlFatalErr(ctxt, XML_ERR_CONDSEC_INVALID, NULL);
6dedca
 	    xmlStopParser(ctxt);
6dedca
+	    ctxt->errNo = XML_ERR_CONDSEC_INVALID;
6dedca
 	    return;
6dedca
 	} else {
6dedca
 	    if (ctxt->input->id != id) {
6dedca
@@ -6881,6 +6883,7 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
6dedca
     } else {
6dedca
 	xmlFatalErr(ctxt, XML_ERR_CONDSEC_INVALID_KEYWORD, NULL);
6dedca
 	xmlStopParser(ctxt);
6dedca
+	ctxt->errNo = XML_ERR_CONDSEC_INVALID_KEYWORD;
6dedca
 	return;
6dedca
     }
6dedca
 
6dedca
-- 
6dedca
2.5.0
6dedca