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");
|
clicon_err(OE_UNIX, EINVAL, "unicode2utf error");
|
||||||
goto done;
|
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{
|
else{
|
||||||
clicon_err(OE_UNIX, EINVAL, "unicode2utf error");
|
clicon_err(OE_UNIX, EINVAL, "unicode2utf error");
|
||||||
goto done;
|
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)
|
else if (yang_parse_module(h, "ietf-yang-library", "2019-01-04", yspec, NULL) < 0)
|
||||||
goto fail;
|
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;
|
goto done;
|
||||||
#else
|
#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;
|
goto done;
|
||||||
#endif
|
#endif
|
||||||
retval = 1;
|
retval = 1;
|
||||||
|
|
|
||||||
|
|
@ -1436,6 +1436,10 @@ yang_parse_post(clicon_handle h,
|
||||||
struct yang_stmt **ylist = NULL; /* Topology sorted modules */
|
struct yang_stmt **ylist = NULL; /* Topology sorted modules */
|
||||||
int ylen = 0; /* Length of ylist */
|
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.
|
/* 1: Parse from text to yang parse-tree.
|
||||||
* Iterate through modules and detect module/submodules to parse
|
* Iterate through modules and detect module/submodules to parse
|
||||||
* NOTE: the list may grow on each iteration */
|
* NOTE: the list may grow on each iteration */
|
||||||
|
|
|
||||||
|
|
@ -617,7 +617,7 @@ module clixon-config {
|
||||||
edit operation.
|
edit operation.
|
||||||
Setting this option disables this behaviour, ie the startup configuration is NOT
|
Setting this option disables this behaviour, ie the startup configuration is NOT
|
||||||
automatically updated.
|
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 {
|
leaf CLICON_RESTCONF_USER {
|
||||||
type string;
|
type string;
|
||||||
|
|
@ -1111,7 +1111,7 @@ module clixon-config {
|
||||||
restconf GET.
|
restconf GET.
|
||||||
The module state data is on the form:
|
The module state data is on the form:
|
||||||
<yang-library><module-set>...
|
<yang-library><module-set>...
|
||||||
instead where the modile state is on the form:
|
instead where the module state is on the form:
|
||||||
<modules-state>...
|
<modules-state>...
|
||||||
See also CLICON_XMLDB_MODSTATE where the module state info is used to tag datastores
|
See also CLICON_XMLDB_MODSTATE where the module state info is used to tag datastores
|
||||||
with module information.";
|
with module information.";
|
||||||
|
|
@ -1148,7 +1148,7 @@ module clixon-config {
|
||||||
default false;
|
default false;
|
||||||
description
|
description
|
||||||
"Enable event stream discovery as described in RFC 5277
|
"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";
|
when doing netconf get or restconf GET";
|
||||||
}
|
}
|
||||||
leaf CLICON_STREAM_DISCOVERY_RFC8040 {
|
leaf CLICON_STREAM_DISCOVERY_RFC8040 {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue