* minor edits make datastore=nocache pass tests, and ensure generic copy-config works

This commit is contained in:
Olof hagsand 2020-12-04 14:44:22 +01:00
parent 99c570e278
commit a71e8aaceb
6 changed files with 62 additions and 48 deletions

View file

@ -890,7 +890,8 @@ main(int argc,
/* Initiate the shared candidate. */
if (xmldb_copy(h, "running", "candidate") < 0)
goto done;
xmldb_modified_set(h, "candidate", 0);
if (xmldb_modified_set(h, "candidate", 0) <0)
goto done;
/* Set startup status */
if (clicon_startup_status_set(h, status) < 0)

View file

@ -244,7 +244,9 @@ startup_extraxml(clicon_handle h,
*/
if (xmldb_get(h, tmp_db, NULL, NULL, &xt0) < 0)
goto done;
if (xmldb_empty_get(h, tmp_db))
if ((ret = xmldb_empty_get(h, tmp_db)) < 0)
goto done;
if (ret == 1)
goto ok;
xt = NULL;
/* Validate the tmp db and return possibly upgraded xml in xt