* Fixed issue https://github.com/clicon/clixon/issues/18 RPC response issues reported by Stephen Jones at Netgate
This commit is contained in:
parent
67c0abead7
commit
3ed1c98556
11 changed files with 215 additions and 113 deletions
|
|
@ -32,7 +32,9 @@
|
|||
***** END LICENSE BLOCK *****
|
||||
|
||||
* Yang functions
|
||||
*/
|
||||
* @see https://tools.ietf.org/html/rfc6020 YANG 1.0
|
||||
* @see https://tools.ietf.org/html/rfc7950 YANG 1.1
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "clixon_config.h" /* generated by config & autoconf */
|
||||
|
|
@ -1975,8 +1977,9 @@ schema_nodeid_vec(yang_node *yn,
|
|||
/*! Given an absolute schema-nodeid (eg /a/b/c) find matching yang spec
|
||||
* @param[in] yspec Yang specification.
|
||||
* @param[in] schema_nodeid Absolute schema-node-id, ie /a/b
|
||||
* @retval NULL Error, with clicon_err called
|
||||
* @retval yres First yang node matching schema nodeid
|
||||
* @param[out] yres Result yang statement node, or NULL if not found
|
||||
* @retval -1 Error, with clicon_err called
|
||||
* @retval 0 OK (if yres set then found, if yres=0 then not found)
|
||||
* Assume schema nodeid:s have prefixes, (actually the first).
|
||||
* @see yang_desc_schema_nodeid
|
||||
* Used in yang: deviation, top-level augment
|
||||
|
|
@ -2011,8 +2014,8 @@ yang_abs_schema_nodeid(yang_spec *yspec,
|
|||
}
|
||||
/* split <prefix>:<id> */
|
||||
if ((id = strchr(vec[1], ':')) == NULL){ /* no prefix */
|
||||
clicon_err(OE_YANG, 0, "Absolute schema nodeid must have prefix");
|
||||
goto done;
|
||||
clicon_log(LOG_WARNING, "%s: Absolute schema nodeid must have prefix", __FUNCTION__);
|
||||
goto ok;
|
||||
}
|
||||
if ((prefix = strdup(vec[1])) == NULL){
|
||||
clicon_err(OE_UNIX, errno, "%s: strdup", __FUNCTION__);
|
||||
|
|
@ -2040,6 +2043,7 @@ yang_abs_schema_nodeid(yang_spec *yspec,
|
|||
}
|
||||
if (schema_nodeid_vec((yang_node*)ymod, vec+1, nvec-1, yres) < 0)
|
||||
goto done;
|
||||
ok: /* yres may not be set */
|
||||
retval = 0;
|
||||
done:
|
||||
if (vec)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue