mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-06-04 00:37:53 +00:00
lib: Fix LYD_NEW_PATH_OUTPUT issue to support libyang v3.x
Fix the LYD_NEW_PATH_OUTPUT undeclared error to support the latest libyang v3.x version,
and also compatible with old version.
Signed-off-by: Lu Mao <lu.mao@molex.com>
(cherry picked from commit 87c9060f90
)
This commit is contained in:
parent
c60f439098
commit
b346f80548
@ -25,6 +25,11 @@ DEFINE_MTYPE_STATIC(LIB, YANG_DATA, "YANG data structure");
|
||||
#define yang_lyd_find_xpath3(ctx_node, tree, xpath, format, prefix_data, vars, \
|
||||
set) \
|
||||
lyd_find_xpath3(ctx_node, tree, xpath, vars, set)
|
||||
|
||||
#ifndef LYD_NEW_VAL_OUTPUT
|
||||
#define LYD_NEW_VAL_OUTPUT LYD_NEW_PATH_OUTPUT
|
||||
#endif
|
||||
|
||||
#else
|
||||
#define yang_lyd_find_xpath3(ctx_node, tree, xpath, format, prefix_data, vars, \
|
||||
set) \
|
||||
@ -671,7 +676,7 @@ void yang_dnode_rpc_output_add(struct lyd_node *output, const char *xpath,
|
||||
LY_ERR err;
|
||||
|
||||
err = lyd_new_path(output, ly_native_ctx, xpath, value,
|
||||
LYD_NEW_PATH_OUTPUT | LYD_NEW_PATH_UPDATE, NULL);
|
||||
LYD_NEW_VAL_OUTPUT | LYD_NEW_PATH_UPDATE, NULL);
|
||||
assert(err == LY_SUCCESS);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user