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
|
Developers may need to change their code
|
||||||
|
|
||||||
|
* Removed `yspec_free()` - replace with `ys_free()`
|
||||||
* Removed `endtag` parameter of `clixon_xml_parse_file()`
|
* Removed `endtag` parameter of `clixon_xml_parse_file()`
|
||||||
* Restconf authentication callback (ca_auth) signature changed (again)
|
* Restconf authentication callback (ca_auth) signature changed (again)
|
||||||
* Minor modification to 5.0 change: userp removed.
|
* 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)
|
if ((x = clicon_xml_changelog_get(h)) != NULL)
|
||||||
xml_free(x);
|
xml_free(x);
|
||||||
if ((yspec = clicon_dbspec_yang(h)) != NULL)
|
if ((yspec = clicon_dbspec_yang(h)) != NULL)
|
||||||
yspec_free(yspec);
|
ys_free(yspec);
|
||||||
if ((yspec = clicon_config_yang(h)) != NULL)
|
if ((yspec = clicon_config_yang(h)) != NULL)
|
||||||
yspec_free(yspec);
|
ys_free(yspec);
|
||||||
if ((yspec = clicon_nacm_ext_yang(h)) != NULL)
|
if ((yspec = clicon_nacm_ext_yang(h)) != NULL)
|
||||||
yspec_free(yspec);
|
ys_free(yspec);
|
||||||
if ((nsctx = clicon_nsctx_global_get(h)) != NULL)
|
if ((nsctx = clicon_nsctx_global_get(h)) != NULL)
|
||||||
cvec_free(nsctx);
|
cvec_free(nsctx);
|
||||||
if ((x = clicon_nacm_ext(h)) != NULL)
|
if ((x = clicon_nacm_ext(h)) != NULL)
|
||||||
|
|
|
||||||
|
|
@ -169,9 +169,9 @@ cli_terminate(clicon_handle h)
|
||||||
|
|
||||||
clicon_rpc_close_session(h);
|
clicon_rpc_close_session(h);
|
||||||
if ((yspec = clicon_dbspec_yang(h)) != NULL)
|
if ((yspec = clicon_dbspec_yang(h)) != NULL)
|
||||||
yspec_free(yspec);
|
ys_free(yspec);
|
||||||
if ((yspec = clicon_config_yang(h)) != NULL)
|
if ((yspec = clicon_config_yang(h)) != NULL)
|
||||||
yspec_free(yspec);
|
ys_free(yspec);
|
||||||
if ((nsctx = clicon_nsctx_global_get(h)) != NULL)
|
if ((nsctx = clicon_nsctx_global_get(h)) != NULL)
|
||||||
cvec_free(nsctx);
|
cvec_free(nsctx);
|
||||||
if ((x = clicon_conf_xml(h)) != NULL)
|
if ((x = clicon_conf_xml(h)) != NULL)
|
||||||
|
|
|
||||||
|
|
@ -588,9 +588,9 @@ netconf_terminate(clicon_handle h)
|
||||||
rpc_callback_delete_all(h);
|
rpc_callback_delete_all(h);
|
||||||
clicon_rpc_close_session(h);
|
clicon_rpc_close_session(h);
|
||||||
if ((yspec = clicon_dbspec_yang(h)) != NULL)
|
if ((yspec = clicon_dbspec_yang(h)) != NULL)
|
||||||
yspec_free(yspec);
|
ys_free(yspec);
|
||||||
if ((yspec = clicon_config_yang(h)) != NULL)
|
if ((yspec = clicon_config_yang(h)) != NULL)
|
||||||
yspec_free(yspec);
|
ys_free(yspec);
|
||||||
if ((nsctx = clicon_nsctx_global_get(h)) != NULL)
|
if ((nsctx = clicon_nsctx_global_get(h)) != NULL)
|
||||||
cvec_free(nsctx);
|
cvec_free(nsctx);
|
||||||
if ((x = clicon_conf_xml(h)) != NULL)
|
if ((x = clicon_conf_xml(h)) != NULL)
|
||||||
|
|
|
||||||
|
|
@ -246,9 +246,9 @@ restconf_terminate(clicon_handle h)
|
||||||
rpc_callback_delete_all(h);
|
rpc_callback_delete_all(h);
|
||||||
clicon_rpc_close_session(h);
|
clicon_rpc_close_session(h);
|
||||||
if ((yspec = clicon_dbspec_yang(h)) != NULL)
|
if ((yspec = clicon_dbspec_yang(h)) != NULL)
|
||||||
yspec_free(yspec);
|
ys_free(yspec);
|
||||||
if ((yspec = clicon_config_yang(h)) != NULL)
|
if ((yspec = clicon_config_yang(h)) != NULL)
|
||||||
yspec_free(yspec);
|
ys_free(yspec);
|
||||||
if ((nsctx = clicon_nsctx_global_get(h)) != NULL)
|
if ((nsctx = clicon_nsctx_global_get(h)) != NULL)
|
||||||
cvec_free(nsctx);
|
cvec_free(nsctx);
|
||||||
if ((x = clicon_conf_xml(h)) != NULL)
|
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);
|
yang_stmt *ys_prune(yang_stmt *yp, int i);
|
||||||
|
|
||||||
int ys_free(yang_stmt *ys);
|
int ys_free(yang_stmt *ys);
|
||||||
int yspec_free(yang_stmt *yspec);
|
|
||||||
int ys_cp(yang_stmt *nw, yang_stmt *old);
|
int ys_cp(yang_stmt *nw, yang_stmt *old);
|
||||||
yang_stmt *ys_dup(yang_stmt *old);
|
yang_stmt *ys_dup(yang_stmt *old);
|
||||||
int yn_insert(yang_stmt *ys_parent, yang_stmt *ys_child);
|
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 */
|
/* End access functions */
|
||||||
|
|
||||||
/*! Create new yang specification
|
/*! Create new yang specification
|
||||||
* @retval yspec Free with yspec_free()
|
* @retval yspec Free with ys_free()
|
||||||
* @retval NULL Error
|
* @retval NULL Error
|
||||||
*/
|
*/
|
||||||
yang_stmt *
|
yang_stmt *
|
||||||
|
|
@ -532,24 +532,6 @@ ys_free(yang_stmt *ys)
|
||||||
return 0;
|
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 */
|
/*! Allocate larger yang statement vector adding empty field last */
|
||||||
static int
|
static int
|
||||||
yn_realloc(yang_stmt *yn)
|
yn_realloc(yang_stmt *yn)
|
||||||
|
|
|
||||||
|
|
@ -345,7 +345,7 @@ main(int argc, char **argv)
|
||||||
if (h)
|
if (h)
|
||||||
clicon_handle_exit(h);
|
clicon_handle_exit(h);
|
||||||
if (yspec)
|
if (yspec)
|
||||||
yspec_free(yspec);
|
ys_free(yspec);
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -155,7 +155,7 @@ main(int argc,
|
||||||
retval = 0;
|
retval = 0;
|
||||||
done:
|
done:
|
||||||
if (yspec)
|
if (yspec)
|
||||||
yspec_free(yspec);
|
ys_free(yspec);
|
||||||
if (xt)
|
if (xt)
|
||||||
xml_free(xt);
|
xml_free(xt);
|
||||||
if (cb)
|
if (cb)
|
||||||
|
|
|
||||||
|
|
@ -286,7 +286,7 @@ main(int argc,
|
||||||
retval = 0;
|
retval = 0;
|
||||||
done:
|
done:
|
||||||
if (yspec != NULL)
|
if (yspec != NULL)
|
||||||
yspec_free(yspec);
|
ys_free(yspec);
|
||||||
if (cb)
|
if (cb)
|
||||||
cbuf_free(cb);
|
cbuf_free(cb);
|
||||||
if (xvec)
|
if (xvec)
|
||||||
|
|
|
||||||
|
|
@ -298,7 +298,7 @@ main(int argc, char **argv)
|
||||||
if (reason)
|
if (reason)
|
||||||
free(reason);
|
free(reason);
|
||||||
if (yspec)
|
if (yspec)
|
||||||
yspec_free(yspec);
|
ys_free(yspec);
|
||||||
if (fd > 0)
|
if (fd > 0)
|
||||||
close(fd);
|
close(fd);
|
||||||
return retval;
|
return retval;
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,7 @@ main(int argc, char **argv)
|
||||||
yang_print(stdout, yspec);
|
yang_print(stdout, yspec);
|
||||||
done:
|
done:
|
||||||
if (yspec)
|
if (yspec)
|
||||||
yspec_free(yspec);
|
ys_free(yspec);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue