Fixed: ["autocli:hide-show" extension cause bug in xmldb_put method #343](https://github.com/clicon/clixon/issues/343)

As a side-effect, added extra "autocliext" parameter to:
- clixon_xml2file()
- clixon_json2file()
- clixon_json2cbuf()
- clixon_txt2file()
This commit is contained in:
Olof hagsand 2022-07-22 15:56:06 +02:00
parent e724dd7f40
commit 4514f2a538
26 changed files with 213 additions and 144 deletions

View file

@ -1244,10 +1244,10 @@ xmldb_put(clicon_handle h,
}
pretty = clicon_option_bool(h, "CLICON_XMLDB_PRETTY");
if (strcmp(format,"json")==0){
if (clixon_json2file(f, x0, pretty, fprintf, 0) < 0)
if (clixon_json2file(f, x0, pretty, fprintf, 0, 0) < 0)
goto done;
}
else if (clixon_xml2file(f, x0, 0, pretty, fprintf, 0) < 0)
else if (clixon_xml2file(f, x0, 0, pretty, fprintf, 0, 0) < 0)
goto done;
/* Remove modules state after writing to file
*/
@ -1302,10 +1302,10 @@ xmldb_dump(clicon_handle h,
}
pretty = clicon_option_bool(h, "CLICON_XMLDB_PRETTY");
if (strcmp(format,"json")==0){
if (clixon_json2file(f, xt, pretty, fprintf, 0) < 0)
if (clixon_json2file(f, xt, pretty, fprintf, 0, 0) < 0)
goto done;
}
else if (clixon_xml2file(f, xt, 0, pretty, fprintf, 0) < 0)
else if (clixon_xml2file(f, xt, 0, pretty, fprintf, 0, 0) < 0)
goto done;
retval = 0;
done: