* RESTCONF "depth" query parameter supported
* C API change: Added `depth` parameter to function `clicon_xml2cbuf`, default is -1.
This commit is contained in:
parent
10a2dbe8ec
commit
ee329ee382
31 changed files with 289 additions and 117 deletions
|
|
@ -64,11 +64,12 @@ plugin_exit(clicon_handle h)
|
|||
|
||||
/*! Local example netconf rpc callback
|
||||
*/
|
||||
int netconf_client_rpc(clicon_handle h,
|
||||
cxobj *xe,
|
||||
cbuf *cbret,
|
||||
void *arg,
|
||||
void *regarg)
|
||||
int
|
||||
netconf_client_rpc(clicon_handle h,
|
||||
cxobj *xe,
|
||||
cbuf *cbret,
|
||||
void *arg,
|
||||
void *regarg)
|
||||
{
|
||||
int retval = -1;
|
||||
cxobj *x = NULL;
|
||||
|
|
@ -85,7 +86,7 @@ int netconf_client_rpc(clicon_handle h,
|
|||
else while ((x = xml_child_each(xe, x, CX_ELMNT)) != NULL) {
|
||||
if (xmlns_set(x, NULL, namespace) < 0)
|
||||
goto done;
|
||||
if (clicon_xml2cbuf(cbret, x, 0, 0) < 0)
|
||||
if (clicon_xml2cbuf(cbret, x, 0, 0, -1) < 0)
|
||||
goto done;
|
||||
}
|
||||
cprintf(cbret, "</rpc-reply>");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue