summaryrefslogtreecommitdiff
path: root/lib/northbound_sysrepo.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2020-10-07 11:50:52 -0300
committerGitHub <noreply@github.com>2020-10-07 11:50:52 -0300
commit9cfb2747adc875a7aaa7f99a45a65f65234a2004 (patch)
tree2f1528432631a32fb22d98826a2ebb5ffd23246d /lib/northbound_sysrepo.c
parent0ed866fd217079d7d7739b6f78fb01f3fd6533fd (diff)
parent9bee02322f69e34c54510f8dff245e52794fdfc8 (diff)
Merge pull request #7241 from chiragshah6/evpn_dev1
lib: add errmsg to nb rpc
Diffstat (limited to 'lib/northbound_sysrepo.c')
-rw-r--r--lib/northbound_sysrepo.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/northbound_sysrepo.c b/lib/northbound_sysrepo.c
index b5ef040a3f..3cd310c5a7 100644
--- a/lib/northbound_sysrepo.c
+++ b/lib/northbound_sysrepo.c
@@ -414,6 +414,7 @@ static int frr_sr_config_rpc_cb(sr_session_ctx_t *session, const char *xpath,
struct yang_data *data;
size_t cb_output_cnt;
int ret = SR_ERR_OK;
+ char errmsg[BUFSIZ] = {0};
nb_node = nb_node_find(xpath);
if (!nb_node) {
@@ -436,7 +437,9 @@ static int frr_sr_config_rpc_cb(sr_session_ctx_t *session, const char *xpath,
}
/* Execute callback registered for this XPath. */
- if (nb_callback_rpc(nb_node, xpath, input, output) != NB_OK) {
+ if (nb_callback_rpc(nb_node, xpath, input, output, errmsg,
+ sizeof(errmsg))
+ != NB_OK) {
flog_warn(EC_LIB_NB_CB_RPC, "%s: rpc callback failed: %s",
__func__, xpath);
ret = SR_ERR_OPERATION_FAILED;