forked from Mirror/frr
lib: constify yang_resolve_snode_xpath results
Signed-off-by: Christian Hopps <chopps@labn.net> ang
This commit is contained in:
parent
aab2946088
commit
0913d9fc0e
|
@ -178,7 +178,7 @@ struct nb_node *nb_node_find(const char *path)
|
||||||
|
|
||||||
struct nb_node **nb_nodes_find(const char *xpath)
|
struct nb_node **nb_nodes_find(const char *xpath)
|
||||||
{
|
{
|
||||||
struct lysc_node **snodes = NULL;
|
const struct lysc_node **snodes = NULL;
|
||||||
struct nb_node **nb_nodes = NULL;
|
struct nb_node **nb_nodes = NULL;
|
||||||
bool simple;
|
bool simple;
|
||||||
LY_ERR err;
|
LY_ERR err;
|
||||||
|
|
|
@ -286,7 +286,7 @@ void yang_snode_get_path(const struct lysc_node *snode,
|
||||||
}
|
}
|
||||||
|
|
||||||
LY_ERR yang_resolve_snode_xpath(struct ly_ctx *ly_ctx, const char *xpath,
|
LY_ERR yang_resolve_snode_xpath(struct ly_ctx *ly_ctx, const char *xpath,
|
||||||
struct lysc_node ***snodes, bool *simple)
|
const struct lysc_node ***snodes, bool *simple)
|
||||||
{
|
{
|
||||||
struct lysc_node *snode;
|
struct lysc_node *snode;
|
||||||
struct ly_set *set;
|
struct ly_set *set;
|
||||||
|
|
|
@ -827,7 +827,8 @@ extern int yang_xpath_pop_node(char *xpath);
|
||||||
* Return: a libyang error or LY_SUCCESS.
|
* Return: a libyang error or LY_SUCCESS.
|
||||||
*/
|
*/
|
||||||
extern LY_ERR yang_resolve_snode_xpath(struct ly_ctx *ly_ctx, const char *xpath,
|
extern LY_ERR yang_resolve_snode_xpath(struct ly_ctx *ly_ctx, const char *xpath,
|
||||||
struct lysc_node ***snodes, bool *simple);
|
const struct lysc_node ***snodes,
|
||||||
|
bool *simple);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Libyang future functions
|
* Libyang future functions
|
||||||
|
|
|
@ -1282,8 +1282,7 @@ static void fe_adapter_handle_get_data(struct mgmt_fe_session_ctx *session,
|
||||||
void *__msg, size_t msg_len)
|
void *__msg, size_t msg_len)
|
||||||
{
|
{
|
||||||
struct mgmt_msg_get_data *msg = __msg;
|
struct mgmt_msg_get_data *msg = __msg;
|
||||||
struct lysc_node **snodes = NULL;
|
const struct lysc_node **snodes = NULL;
|
||||||
char *xpath_resolved = NULL;
|
|
||||||
uint64_t req_id = msg->req_id;
|
uint64_t req_id = msg->req_id;
|
||||||
Mgmtd__DatastoreId ds_id;
|
Mgmtd__DatastoreId ds_id;
|
||||||
uint64_t clients;
|
uint64_t clients;
|
||||||
|
@ -1395,7 +1394,6 @@ static void fe_adapter_handle_get_data(struct mgmt_fe_session_ctx *session,
|
||||||
}
|
}
|
||||||
done:
|
done:
|
||||||
darr_free(snodes);
|
darr_free(snodes);
|
||||||
darr_free(xpath_resolved);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void fe_adapter_handle_edit(struct mgmt_fe_session_ctx *session,
|
static void fe_adapter_handle_edit(struct mgmt_fe_session_ctx *session,
|
||||||
|
|
Loading…
Reference in a new issue