add yang-spec as arg to decode clicon msg
This commit is contained in:
parent
b443471e7b
commit
11479f7ec3
7 changed files with 23 additions and 20 deletions
|
|
@ -160,10 +160,12 @@ clicon_msg_encode(char *format, ...)
|
|||
|
||||
/*! Decode a clicon netconf message
|
||||
* @param[in] msg CLICON msg
|
||||
* @param[in] yspec Yang specification, (can be NULL)
|
||||
* @param[out] xml XML parse tree
|
||||
*/
|
||||
int
|
||||
clicon_msg_decode(struct clicon_msg *msg,
|
||||
yang_spec *yspec,
|
||||
cxobj **xml)
|
||||
{
|
||||
int retval = -1;
|
||||
|
|
@ -172,7 +174,7 @@ clicon_msg_decode(struct clicon_msg *msg,
|
|||
/* body */
|
||||
xmlstr = msg->op_body;
|
||||
clicon_debug(1, "%s %s", __FUNCTION__, xmlstr);
|
||||
if (xml_parse_string(xmlstr, NULL, xml) < 0)
|
||||
if (xml_parse_string(xmlstr, yspec, xml) < 0)
|
||||
goto done;
|
||||
retval = 0;
|
||||
done:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue