Minor fixes: UTF str: removed unused code, clarified loading of yang-lib load
This commit is contained in:
parent
856c9058f8
commit
f6dbb30110
5 changed files with 14 additions and 17 deletions
|
|
@ -1080,17 +1080,6 @@ clixon_unicode2utf8_one(uint16_t uc16,
|
|||
clicon_err(OE_UNIX, EINVAL, "unicode2utf error");
|
||||
goto done;
|
||||
}
|
||||
else if (uc16<0x10000) {
|
||||
*utfstr++=224+uc16/4096;
|
||||
*utfstr++=128+uc16/64%64;
|
||||
*utfstr++=128+uc16%64;
|
||||
}
|
||||
else if (uc16<0x110000) {
|
||||
*utfstr++=240+uc16/262144;
|
||||
*utfstr++=128+uc16/4096%64;
|
||||
*utfstr++=128+uc16/64%64;
|
||||
*utfstr++=128+uc16%64;
|
||||
}
|
||||
else{
|
||||
clicon_err(OE_UNIX, EINVAL, "unicode2utf error");
|
||||
goto done;
|
||||
|
|
|
|||
|
|
@ -883,10 +883,14 @@ yang_lib2yspec(clicon_handle h,
|
|||
}
|
||||
else if (yang_parse_module(h, "ietf-yang-library", "2019-01-04", yspec, NULL) < 0)
|
||||
goto fail;
|
||||
if (yang_parse_post(h, yspec, yang_len_get(yspec) - (1+veclen - modmin)) < 0)
|
||||
if ((modmin = yang_len_get(yspec) - (1+veclen - modmin)) < 0)
|
||||
goto fail;
|
||||
if (yang_parse_post(h, yspec, modmin) < 0)
|
||||
goto done;
|
||||
#else
|
||||
if (yang_parse_post(h, yspec, yang_len_get(yspec) - (veclen - modmin)) < 0)
|
||||
if ((modmin = yang_len_get(yspec) - (1+veclen - modmin)) < 0)
|
||||
goto fail;
|
||||
if (yang_parse_post(h, yspec, modmin) < 0)
|
||||
goto done;
|
||||
#endif
|
||||
retval = 1;
|
||||
|
|
|
|||
|
|
@ -1436,6 +1436,10 @@ yang_parse_post(clicon_handle h,
|
|||
struct yang_stmt **ylist = NULL; /* Topology sorted modules */
|
||||
int ylen = 0; /* Length of ylist */
|
||||
|
||||
if (modmin < 0){
|
||||
clicon_err(OE_YANG, EINVAL, "modmin negative");
|
||||
goto done;
|
||||
}
|
||||
/* 1: Parse from text to yang parse-tree.
|
||||
* Iterate through modules and detect module/submodules to parse
|
||||
* NOTE: the list may grow on each iteration */
|
||||
|
|
|
|||
|
|
@ -617,7 +617,7 @@ module clixon-config {
|
|||
edit operation.
|
||||
Setting this option disables this behaviour, ie the startup configuration is NOT
|
||||
automatically updated.
|
||||
If this option is false, the startup is autoamtically updated following the RFC";
|
||||
If this option is false, the startup is automatically updated following the RFC";
|
||||
}
|
||||
leaf CLICON_RESTCONF_USER {
|
||||
type string;
|
||||
|
|
@ -1111,7 +1111,7 @@ module clixon-config {
|
|||
restconf GET.
|
||||
The module state data is on the form:
|
||||
<yang-library><module-set>...
|
||||
instead where the modile state is on the form:
|
||||
instead where the module state is on the form:
|
||||
<modules-state>...
|
||||
See also CLICON_XMLDB_MODSTATE where the module state info is used to tag datastores
|
||||
with module information.";
|
||||
|
|
@ -1148,7 +1148,7 @@ module clixon-config {
|
|||
default false;
|
||||
description
|
||||
"Enable event stream discovery as described in RFC 5277
|
||||
sections 3.2. If enabled, available streams will appear
|
||||
section 3.2. If enabled, available streams will appear
|
||||
when doing netconf get or restconf GET";
|
||||
}
|
||||
leaf CLICON_STREAM_DISCOVERY_RFC8040 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue