Structural C-code change: Merged yang_spec and yang_node types into yang_stmt
This commit is contained in:
parent
4f9e942103
commit
b5f1f7346e
52 changed files with 492 additions and 496 deletions
|
|
@ -92,7 +92,7 @@ netconf_input_packet(clicon_handle h,
|
|||
cxobj *xret = NULL; /* Return (out) */
|
||||
cxobj *xrpc;
|
||||
cxobj *xc;
|
||||
yang_spec *yspec;
|
||||
yang_stmt *yspec;
|
||||
int ret;
|
||||
cxobj *xa;
|
||||
cxobj *xa2;
|
||||
|
|
@ -290,7 +290,7 @@ send_hello(clicon_handle h,
|
|||
static int
|
||||
netconf_terminate(clicon_handle h)
|
||||
{
|
||||
yang_spec *yspec;
|
||||
yang_stmt *yspec;
|
||||
cxobj *x;
|
||||
|
||||
clixon_plugin_exit(h);
|
||||
|
|
@ -357,8 +357,8 @@ main(int argc,
|
|||
int logdst = CLICON_LOG_STDERR;
|
||||
struct passwd *pw;
|
||||
struct timeval tv = {0,}; /* timeout */
|
||||
yang_spec *yspec = NULL;
|
||||
yang_spec *yspecfg = NULL; /* For config XXX clixon bug */
|
||||
yang_stmt *yspec = NULL;
|
||||
yang_stmt *yspecfg = NULL; /* For config XXX clixon bug */
|
||||
char *str;
|
||||
|
||||
/* Create handle */
|
||||
|
|
|
|||
|
|
@ -427,7 +427,7 @@ netconf_notification_cb(int s,
|
|||
cxobj *xn = NULL; /* event xml */
|
||||
cxobj *xt = NULL; /* top xml */
|
||||
clicon_handle h = (clicon_handle)arg;
|
||||
yang_spec *yspec = NULL;
|
||||
yang_stmt *yspec = NULL;
|
||||
|
||||
clicon_debug(1, "%s", __FUNCTION__);
|
||||
/* get msg (this is the reason this function is called) */
|
||||
|
|
@ -541,7 +541,7 @@ netconf_application_rpc(clicon_handle h,
|
|||
cxobj **xret)
|
||||
{
|
||||
int retval = -1;
|
||||
yang_spec *yspec = NULL; /* application yspec */
|
||||
yang_stmt *yspec = NULL; /* application yspec */
|
||||
yang_stmt *yrpc = NULL;
|
||||
yang_stmt *ymod = NULL;
|
||||
yang_stmt *yinput;
|
||||
|
|
@ -579,11 +579,11 @@ netconf_application_rpc(clicon_handle h,
|
|||
"</rpc-error></rpc-reply>", xml_name(xn));
|
||||
goto ok;
|
||||
}
|
||||
yrpc = yang_find((yang_node*)ymod, Y_RPC, xml_name(xn));
|
||||
yrpc = yang_find(ymod, Y_RPC, xml_name(xn));
|
||||
/* Check if found */
|
||||
if (yrpc != NULL){
|
||||
/* 1. Check xn arguments with input statement. */
|
||||
if ((yinput = yang_find((yang_node*)yrpc, Y_INPUT, NULL)) != NULL){
|
||||
if ((yinput = yang_find(yrpc, Y_INPUT, NULL)) != NULL){
|
||||
xml_spec_set(xn, yinput); /* needed for xml_spec_populate */
|
||||
if (xml_apply(xn, CX_ELMNT, xml_spec_populate, yspec) < 0)
|
||||
goto done;
|
||||
|
|
@ -616,7 +616,7 @@ netconf_application_rpc(clicon_handle h,
|
|||
* (2) Uncertain how validation errors should be logged/handled
|
||||
*/
|
||||
if (0)
|
||||
if ((youtput = yang_find((yang_node*)yrpc, Y_OUTPUT, NULL)) != NULL){
|
||||
if ((youtput = yang_find(yrpc, Y_OUTPUT, NULL)) != NULL){
|
||||
xoutput=xpath_first(*xret, "/");
|
||||
xml_spec_set(xoutput, youtput); /* needed for xml_spec_populate */
|
||||
if (xml_apply(xoutput, CX_ELMNT, xml_spec_populate, yspec) < 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue