* Fix: XPath:s used in netconf (eg get-config) did not correctly access default values

This commit is contained in:
Olof hagsand 2021-05-07 13:07:34 +02:00
parent 0225488c39
commit ac51cb0293
7 changed files with 41 additions and 25 deletions

View file

@ -347,11 +347,11 @@ clixon_plugin_statedata_all(clicon_handle h,
}
if (xml_sort_recurse(x) < 0)
goto done;
/* Mark non-presence containers as XML_FLAG_DEFAULT */
if (xml_apply(x, CX_ELMNT, xml_nopresence_default_mark, (void*)XML_FLAG_DEFAULT) < 0)
/* Mark non-presence containers */
if (xml_apply(x, CX_ELMNT, xml_nopresence_default_mark, (void*)XML_FLAG_TRANSIENT) < 0)
goto done;
/* Clear XML tree of defaults */
if (xml_tree_prune_flagged(x, XML_FLAG_DEFAULT, 1) < 0)
if (xml_tree_prune_flagged(x, XML_FLAG_TRANSIENT, 1) < 0)
goto done;
/* clear mark and change */
xml_apply0(x, CX_ELMNT, (xml_applyfn_t*)xml_flag_reset,