Merge branch 'develop' of https://github.com/clicon/clixon into develop
This commit is contained in:
commit
958c1c0197
7 changed files with 44 additions and 8 deletions
|
|
@ -691,8 +691,9 @@ int
|
|||
json_parse_str(char *str,
|
||||
cxobj **xt)
|
||||
{
|
||||
if ((*xt = xml_new("top", NULL, NULL)) == NULL)
|
||||
return -1;
|
||||
if (*xt == NULL)
|
||||
if ((*xt = xml_new("top", NULL, NULL)) == NULL)
|
||||
return -1;
|
||||
return json_parse(str, "", *xt);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ clixon_plugin_each_revert(clicon_handle h,
|
|||
int nr)
|
||||
{
|
||||
int i;
|
||||
clixon_plugin *cp;
|
||||
clixon_plugin *cp = NULL;
|
||||
clixon_plugin *cpnext = NULL;
|
||||
|
||||
if (cpprev == NULL)
|
||||
|
|
@ -466,7 +466,7 @@ rpc_callback_delete_all(void)
|
|||
* @param[in] h clicon handle
|
||||
* @param[in] xn Sub-tree (under xorig) at child of rpc: <rpc><xn></rpc>.
|
||||
* @param[out] xret Return XML, error or OK
|
||||
* @param[in] arg Domain-speific arg (eg client_entry)
|
||||
* @param[in] arg Domain-speific arg (eg client_entry)
|
||||
*
|
||||
* @retval -1 Error
|
||||
* @retval 0 OK, not found handler.
|
||||
|
|
|
|||
|
|
@ -394,6 +394,7 @@ xml_yang_validate_all(cxobj *xt,
|
|||
* @param[out] cvv CLIgen variable vector. Should be freed by cvec_free()
|
||||
* @retval 0 Everything OK, cvv allocated and set
|
||||
* @retval -1 Something wrong, clicon_err() called to set error. No cvv returned
|
||||
* @note cvv Should be freed by cvec_free() after use.
|
||||
* 'Not recursive' means that only one level of XML bodies is translated to cvec:s.
|
||||
* If range is wriong (eg 1000 for uint8) a warning is logged, the value is
|
||||
* skipped, and continues.
|
||||
|
|
@ -426,7 +427,7 @@ xml2cvec(cxobj *xt,
|
|||
char *name;
|
||||
|
||||
xc = NULL;
|
||||
/* Tried to allocate whole cvv here,but some cg_vars may be invalid */
|
||||
/* Tried to allocate whole cvv here, but some cg_vars may be invalid */
|
||||
if ((cvv = cvec_new(0)) == NULL){
|
||||
clicon_err(OE_UNIX, errno, "cvec_new");
|
||||
goto err;
|
||||
|
|
|
|||
|
|
@ -976,10 +976,10 @@ xpath_first(cxobj *xcur,
|
|||
* }
|
||||
* @endcode
|
||||
*
|
||||
* Note that the returned pointer points into the original tree so should not be freed
|
||||
* @note The returned pointer points into the original tree so should not be freed
|
||||
* after use.
|
||||
* @see also xpath, xpath_vec.
|
||||
* NOTE: uses a static variable: consider replacing with xpath_vec() instead
|
||||
* @note uses a static variable: consider replacing with xpath_vec() instead
|
||||
*/
|
||||
cxobj *
|
||||
xpath_each(cxobj *xcur,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue