Fixed: [xmldb_get0 returns invalid candidate on startup transaction callbacks #126](https://github.com/clicon/clixon/issues/126). Always clear candidate-db before db initialization.

This commit is contained in:
Olof hagsand 2020-09-07 15:09:19 +02:00
parent 658fffb931
commit 5ee6283526
2 changed files with 2 additions and 0 deletions

View file

@ -810,6 +810,7 @@ main(int argc,
if (xmldb_exists(h, "running") != 1)
if (xmldb_create(h, "running") < 0)
return -1;
xmldb_delete(h, "candidate");
/* If startup fails, lib functions report invalidation info in a cbuf */
if ((cbret = cbuf_new()) == NULL){
clicon_err(OE_XML, errno, "cbuf_new");