minor fixes

This commit is contained in:
Olof hagsand 2020-09-27 17:15:36 +02:00
parent 9984cfa1c8
commit 101a8cb6e0
3 changed files with 20 additions and 6 deletions

View file

@ -776,7 +776,7 @@ yang2cli_list(clicon_handle h,
int retval = -1;
char *helptext = NULL;
char *s;
int list_has_callback;
int list_has_callback = 0;
cprintf(cb, "%*s%s", level*3, "", yang_argument_get(ys));
if ((yd = yang_find(ys, Y_DESCRIPTION, NULL)) != NULL){

View file

@ -399,6 +399,8 @@ example_statedata(clicon_handle h,
clicon_err(OE_UNIX, errno, "open(%s)", _state_file);
goto done;
}
if ((xt = xml_new("config", NULL, CX_ELMNT)) == NULL)
goto done;
if (clixon_xml_parse_file(fd, YB_MODULE, yspec, NULL, &xt, NULL) < 0)
goto done;
close(fd);
@ -417,7 +419,6 @@ example_statedata(clicon_handle h,
}
if (xml_copy(xt, xstate) < 0)
goto done;
if (xvec){
free(xvec);
xvec = 0;

View file

@ -234,8 +234,21 @@ yang_augment_node(yang_stmt *ys,
/* Find the target */
if (yang_abs_schema_nodeid(ysp, ys, schema_nodeid, -1, &ytarget) < 0)
goto done;
if (ytarget == NULL)
if (ytarget == NULL){
#if 0
clicon_err(OE_YANG, 0, "Augment failed in module %s: target node %s not found",
yang_argument_get(ys_module(ys)),
schema_nodeid);
goto done;
#else
clicon_log(LOG_WARNING, "Warning: Augment failed in module %s: target node %s not found",
yang_argument_get(ys_module(ys)),
schema_nodeid);
goto ok;
#endif
}
/* Find when statement, if present */
if ((ywhen = yang_find(ys, Y_WHEN, NULL)) != NULL){
wxpath = yang_argument_get(ywhen);