Library functions in clixon_cli_api.h (e.g cli_commit) is rewritten in new
for (eg cli_commitv). See clixon_cli_api.h for new names. Use restconf format for internal xmldb keys. Eg /a/b=3,4 Changed example to use multiple cli callbacks
This commit is contained in:
parent
c9f1ece53e
commit
7f0b9909b3
30 changed files with 1444 additions and 1054 deletions
|
|
@ -243,7 +243,6 @@ int
|
|||
xmldb_get_rpc(clicon_handle h,
|
||||
char *db,
|
||||
char *xpath,
|
||||
int vector,
|
||||
cxobj **xtop,
|
||||
cxobj ***xvec,
|
||||
size_t *xlen)
|
||||
|
|
@ -263,8 +262,6 @@ xmldb_get_rpc(clicon_handle h,
|
|||
cprintf(cb, "<source><%s/></source>", db);
|
||||
if (xpath)
|
||||
cprintf(cb, "<xpath>%s</xpath>", xpath);
|
||||
if (vector)
|
||||
cprintf(cb, "<vector/>");
|
||||
cprintf(cb, "</get></rpc>]]>]]>");
|
||||
if (xmldb_rpc(h,
|
||||
cbuf_get(cb),
|
||||
|
|
@ -273,7 +270,7 @@ xmldb_get_rpc(clicon_handle h,
|
|||
goto done;
|
||||
if (clicon_xml_parse_str(rb, &xt) < 0)
|
||||
goto done;
|
||||
if (vector){
|
||||
if (xvec){
|
||||
i=0;
|
||||
if ((*xvec = calloc(xml_child_nr(xt), sizeof(cxobj*))) ==NULL){
|
||||
clicon_err(OE_UNIX, errno, "calloc");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue