* 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

@ -994,11 +994,11 @@ xmldb_put(clicon_handle h,
if (xml_apply(x0, CX_ELMNT, (xml_applyfn_t*)xml_flag_reset,
(void*)(XML_FLAG_NONE|XML_FLAG_MARK)) < 0)
goto done;
/* Mark non-presence containers as XML_FLAG_DEFAULT */
if (xml_apply(x0, CX_ELMNT, xml_nopresence_default_mark, (void*)XML_FLAG_DEFAULT) < 0)
/* Mark non-presence containers */
if (xml_apply(x0, CX_ELMNT, xml_nopresence_default_mark, (void*)XML_FLAG_TRANSIENT) < 0)
goto done;
/* Clear XML tree of defaults */
if (xml_tree_prune_flagged(x0, XML_FLAG_DEFAULT, 1) < 0)
if (xml_tree_prune_flagged(x0, XML_FLAG_TRANSIENT, 1) < 0)
goto done;
#if 0 /* debug */
if (xml_apply0(x0, -1, xml_sort_verify, NULL) < 0)