Fixed: [Startup and default of same object causes too-many-elements error](https://github.com/clicon/clixon/issues/503)

This commit is contained in:
Olof hagsand 2024-03-18 17:07:43 +01:00
parent 59b3100704
commit 928d7d5b4d
2 changed files with 12 additions and 6 deletions

View file

@ -12,6 +12,10 @@
## 7.1.0
Expected: May 2024
### Corrected Bugs
* Fixed: [Startup and default of same object causes too-many-elements error](https://github.com/clicon/clixon/issues/503)
## 7.0.0
8 March 2024
@ -107,7 +111,7 @@ Developers may need to change their code
* `clicon_strerror(int)` -> `clixon_err_str()`
* `clicon_netconf_error(h, x, fmt)` -> clixon_err_netconf(h, OE_XML, 0, x, fmt)`
* `netconf_err2cb(...)` --> `netconf_err2cb(h, ...)`
* Likewise for some other minor functions: `clicon_err_*` -> `clixon_err_*`
* Likewise for some other minor functions: `clicon_err_*` -> `clixon_err_*`
* Replaced global variables with access functions. Replace variables with functions as follows:
* `clicon_errno` -> `clixon_err_category()`
* `clicon_suberrno` -> `clixon_err_subnr()`

View file

@ -731,11 +731,13 @@ xmldb_get_cache(clixon_handle h,
clicon_db_elmnt_set(h, db, &de0); /* Content is copied */
/* Add default global values (to make xpath below include defaults) */
// Alt: xmldb_populate(h, db)
if (xml_global_defaults(h, x0t, nsc, xpath, yspec, 0) < 0)
goto done;
/* Add default recursive values */
if (xml_default_recurse(x0t, 0, 0) < 0)
goto done;
if (yb != YB_NONE) {
if (xml_global_defaults(h, x0t, nsc, xpath, yspec, 0) < 0)
goto done;
/* Add default recursive values */
if (xml_default_recurse(x0t, 0, 0) < 0)
goto done;
}
} /* x0t == NULL */
else
x0t = de->de_xml;