parser BUGFIX do not print opaque node parsing errors
diff --git a/src/parser_xml.c b/src/parser_xml.c
index 219da8c..8e9a5dc 100644
--- a/src/parser_xml.c
+++ b/src/parser_xml.c
@@ -394,8 +394,9 @@
static LY_ERR
lydxml_data_check_opaq(struct lyd_xml_ctx *lydctx, const struct lysc_node **snode)
{
- LY_ERR ret = LY_SUCCESS;
+ LY_ERR ret = LY_SUCCESS, r;
struct lyxml_ctx *xmlctx = lydctx->xmlctx, pxmlctx;
+ uint32_t *prev_lo, temp_lo = 0;
if (!(lydctx->parse_opts & LYD_PARSE_OPAQ)) {
/* only checks specific to opaque nodes */
@@ -420,7 +421,10 @@
if ((*snode)->nodetype & LYD_NODE_TERM) {
/* value may not be valid in which case we parse it as an opaque node */
- if (ly_value_validate(NULL, *snode, xmlctx->value, xmlctx->value_len, LY_VALUE_XML, &xmlctx->ns, LYD_HINT_DATA)) {
+ prev_lo = ly_temp_log_options(&temp_lo);
+ r = ly_value_validate(NULL, *snode, xmlctx->value, xmlctx->value_len, LY_VALUE_XML, &xmlctx->ns, LYD_HINT_DATA);
+ ly_temp_log_options(prev_lo);
+ if (r) {
LOGVRB("Parsing opaque term node \"%s\" with invalid value \"%.*s\".", (*snode)->name, (int)xmlctx->value_len,
xmlctx->value);
*snode = NULL;