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 ## 7.1.0
Expected: May 2024 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 ## 7.0.0
8 March 2024 8 March 2024

View file

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