Fixed: [default state data returned with get-config](https://github.com/clicon/clixon/issues/140)

* Generalized default code for both config and state
This commit is contained in:
Olof hagsand 2020-09-27 17:14:28 +02:00
parent da54dae396
commit 9984cfa1c8
15 changed files with 344 additions and 39 deletions

View file

@ -254,10 +254,10 @@ startup_common(clicon_handle h,
if (xml_sort_recurse(xt) < 0)
goto done;
/* Add global defaults. */
if (xml_global_defaults(h, xt, NULL, NULL, yspec) < 0)
if (xml_global_defaults(h, xt, NULL, NULL, yspec, 0) < 0)
goto done;
/* Apply default values (removed in clear function) */
if (xml_default_recurse(xt) < 0)
if (xml_default_recurse(xt, 0) < 0)
goto done;
/* Handcraft transition with with only add tree */