fixes for compilation

This commit is contained in:
Olof hagsand 2021-07-11 20:35:57 +02:00
parent ba835346a5
commit 2485bec483
7 changed files with 17 additions and 237 deletions

View file

@ -1516,6 +1516,7 @@ netconf_module_load(clicon_handle h)
/* Load restconf yang. Note this is also a part of clixon-config */
if (yang_spec_parse_module(h, "clixon-restconf", NULL, yspec)< 0)
goto done;
#if 1
/* XXX: Both the following settings are because clicon-handle is not part of all API
* functions
* Treat unknown XML as anydata */
@ -1525,10 +1526,7 @@ netconf_module_load(clicon_handle h)
if (clicon_option_bool(h, "CLICON_NETCONF_MESSAGE_ID_OPTIONAL") == 1)
xml_bind_netconf_message_id_optional(1);
#endif
/* Load restconf collection */
if (yang_spec_parse_module(h, "ietf-netconf-list-pagination", NULL, yspec)< 0)
goto done;
/* Load restconf collection */
/* Load netconf list pagination */
if (yang_spec_parse_module(h, "ietf-netconf-list-pagination", NULL, yspec)< 0)
goto done;
retval = 0;

View file

@ -966,7 +966,7 @@ clicon_rpc_get_pageable_list(clicon_handle h,
cprintf(cb, "</get-pageable-list></rpc>");
if ((msg = clicon_msg_encode(session_id, "%s", cbuf_get(cb))) == NULL)
goto done;
if (clicon_rpc_msg(h, msg, &xret, NULL) < 0)
if (clicon_rpc_msg(h, msg, &xret) < 0)
goto done;
/* Send xml error back: first check error, then ok */
if ((xr = xpath_first(xret, NULL, "/rpc-reply/rpc-error")) != NULL)

View file

@ -1838,9 +1838,11 @@ ys_populate_leaf(clicon_handle h,
{
int retval = -1;
cg_var *cv = NULL;
yang_stmt *yparent;
yang_stmt *ydef;
enum cv_type cvtype = CGV_ERR;
int cvret;
int ret;
char *reason = NULL;
yang_stmt *yrestype; /* resolved type */
char *restype; /* resolved type */
@ -1849,6 +1851,7 @@ ys_populate_leaf(clicon_handle h,
int options = 0x0;
yang_stmt *ytypedef; /* where type is define */
yparent = ys->ys_parent; /* Find parent: list/container */
/* 1. Find type specification and set cv type accordingly */
if (yang_type_get(ys, &origtype, &yrestype, &options, NULL, NULL, NULL, &fraction_digits) < 0)
goto done;