Skip to content

Commit

Permalink
Merge pull request FRRouting#16776 from FRRouting/mergify/bp/stable/1…
Browse files Browse the repository at this point in the history
…0.1/pr-16511

Fix LYD_NEW_PATH_OUTPUT issue to support libyang v3.x (backport FRRouting#16511)
  • Loading branch information
ton31337 authored Sep 10, 2024
2 parents c60f439 + b346f80 commit b40447c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/yang.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit b40447c

Please sign in to comment.