Fixed: [state showing error in cli with CLICON_STREAM_DISCOVERY_RFC8040 #191](https://github.com/clicon/clixon/issues/191)
This commit is contained in:
parent
afdf6ffcf8
commit
43db8dd5c5
12 changed files with 16 additions and 34 deletions
|
|
@ -48,6 +48,7 @@ Expected: April
|
|||
|
||||
Developers may need to change their code
|
||||
|
||||
* Removed `yspec_free()` - replace with `ys_free()`
|
||||
* Removed `endtag` parameter of `clixon_xml_parse_file()`
|
||||
* Restconf authentication callback (ca_auth) signature changed (again)
|
||||
* Minor modification to 5.0 change: userp removed.
|
||||
|
|
|
|||
|
|
@ -113,11 +113,11 @@ backend_terminate(clicon_handle h)
|
|||
if ((x = clicon_xml_changelog_get(h)) != NULL)
|
||||
xml_free(x);
|
||||
if ((yspec = clicon_dbspec_yang(h)) != NULL)
|
||||
yspec_free(yspec);
|
||||
ys_free(yspec);
|
||||
if ((yspec = clicon_config_yang(h)) != NULL)
|
||||
yspec_free(yspec);
|
||||
ys_free(yspec);
|
||||
if ((yspec = clicon_nacm_ext_yang(h)) != NULL)
|
||||
yspec_free(yspec);
|
||||
ys_free(yspec);
|
||||
if ((nsctx = clicon_nsctx_global_get(h)) != NULL)
|
||||
cvec_free(nsctx);
|
||||
if ((x = clicon_nacm_ext(h)) != NULL)
|
||||
|
|
|
|||
|
|
@ -169,9 +169,9 @@ cli_terminate(clicon_handle h)
|
|||
|
||||
clicon_rpc_close_session(h);
|
||||
if ((yspec = clicon_dbspec_yang(h)) != NULL)
|
||||
yspec_free(yspec);
|
||||
ys_free(yspec);
|
||||
if ((yspec = clicon_config_yang(h)) != NULL)
|
||||
yspec_free(yspec);
|
||||
ys_free(yspec);
|
||||
if ((nsctx = clicon_nsctx_global_get(h)) != NULL)
|
||||
cvec_free(nsctx);
|
||||
if ((x = clicon_conf_xml(h)) != NULL)
|
||||
|
|
|
|||
|
|
@ -588,9 +588,9 @@ netconf_terminate(clicon_handle h)
|
|||
rpc_callback_delete_all(h);
|
||||
clicon_rpc_close_session(h);
|
||||
if ((yspec = clicon_dbspec_yang(h)) != NULL)
|
||||
yspec_free(yspec);
|
||||
ys_free(yspec);
|
||||
if ((yspec = clicon_config_yang(h)) != NULL)
|
||||
yspec_free(yspec);
|
||||
ys_free(yspec);
|
||||
if ((nsctx = clicon_nsctx_global_get(h)) != NULL)
|
||||
cvec_free(nsctx);
|
||||
if ((x = clicon_conf_xml(h)) != NULL)
|
||||
|
|
|
|||
|
|
@ -246,9 +246,9 @@ restconf_terminate(clicon_handle h)
|
|||
rpc_callback_delete_all(h);
|
||||
clicon_rpc_close_session(h);
|
||||
if ((yspec = clicon_dbspec_yang(h)) != NULL)
|
||||
yspec_free(yspec);
|
||||
ys_free(yspec);
|
||||
if ((yspec = clicon_config_yang(h)) != NULL)
|
||||
yspec_free(yspec);
|
||||
ys_free(yspec);
|
||||
if ((nsctx = clicon_nsctx_global_get(h)) != NULL)
|
||||
cvec_free(nsctx);
|
||||
if ((x = clicon_conf_xml(h)) != NULL)
|
||||
|
|
|
|||
|
|
@ -212,7 +212,6 @@ yang_stmt *ys_new(enum rfc_6020 keyw);
|
|||
yang_stmt *ys_prune(yang_stmt *yp, int i);
|
||||
|
||||
int ys_free(yang_stmt *ys);
|
||||
int yspec_free(yang_stmt *yspec);
|
||||
int ys_cp(yang_stmt *nw, yang_stmt *old);
|
||||
yang_stmt *ys_dup(yang_stmt *old);
|
||||
int yn_insert(yang_stmt *ys_parent, yang_stmt *ys_child);
|
||||
|
|
|
|||
|
|
@ -401,7 +401,7 @@ yang_when_nsc_set(yang_stmt *ys,
|
|||
/* End access functions */
|
||||
|
||||
/*! Create new yang specification
|
||||
* @retval yspec Free with yspec_free()
|
||||
* @retval yspec Free with ys_free()
|
||||
* @retval NULL Error
|
||||
*/
|
||||
yang_stmt *
|
||||
|
|
@ -532,24 +532,6 @@ ys_free(yang_stmt *ys)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*! Free a yang specification recursively
|
||||
*/
|
||||
int
|
||||
yspec_free(yang_stmt *yspec)
|
||||
{
|
||||
int i;
|
||||
yang_stmt *ys;
|
||||
|
||||
for (i=0; i<yspec->ys_len; i++){
|
||||
if ((ys = yspec->ys_stmt[i]) != NULL)
|
||||
ys_free(ys);
|
||||
}
|
||||
if (yspec->ys_stmt)
|
||||
free(yspec->ys_stmt);
|
||||
free(yspec);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*! Allocate larger yang statement vector adding empty field last */
|
||||
static int
|
||||
yn_realloc(yang_stmt *yn)
|
||||
|
|
|
|||
|
|
@ -345,7 +345,7 @@ main(int argc, char **argv)
|
|||
if (h)
|
||||
clicon_handle_exit(h);
|
||||
if (yspec)
|
||||
yspec_free(yspec);
|
||||
ys_free(yspec);
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ main(int argc,
|
|||
retval = 0;
|
||||
done:
|
||||
if (yspec)
|
||||
yspec_free(yspec);
|
||||
ys_free(yspec);
|
||||
if (xt)
|
||||
xml_free(xt);
|
||||
if (cb)
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ main(int argc,
|
|||
retval = 0;
|
||||
done:
|
||||
if (yspec != NULL)
|
||||
yspec_free(yspec);
|
||||
ys_free(yspec);
|
||||
if (cb)
|
||||
cbuf_free(cb);
|
||||
if (xvec)
|
||||
|
|
|
|||
|
|
@ -298,7 +298,7 @@ main(int argc, char **argv)
|
|||
if (reason)
|
||||
free(reason);
|
||||
if (yspec)
|
||||
yspec_free(yspec);
|
||||
ys_free(yspec);
|
||||
if (fd > 0)
|
||||
close(fd);
|
||||
return retval;
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ main(int argc, char **argv)
|
|||
yang_print(stdout, yspec);
|
||||
done:
|
||||
if (yspec)
|
||||
yspec_free(yspec);
|
||||
ys_free(yspec);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue