summaryrefslogtreecommitdiff
path: root/lib/northbound_sysrepo.c
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2022-06-09 17:33:22 +0300
committerDonatas Abraitis <donatas@opensourcerouting.org>2022-06-09 17:33:22 +0300
commit1dd5ce9b9317cce35fc6702f63d48ec7213af1fe (patch)
tree0fd3b6785ccea79ba04da34c533d26787be52640 /lib/northbound_sysrepo.c
parent121903bd01020a24df9c4679dd0b9ab2853a234b (diff)
lib: Update sysrepo code with the latest API changes
* sr_event_notif_send -> sr_notif_send * sr_process_events -> sr_subscription_process_events * sr_oper_get_items_subscribe -> sr_oper_get_subscribe * Removed SR_SUBSCR_CTX_REUSE flag from the code at all Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'lib/northbound_sysrepo.c')
-rw-r--r--lib/northbound_sysrepo.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/northbound_sysrepo.c b/lib/northbound_sysrepo.c
index 8a64347871..f035ac8611 100644
--- a/lib/northbound_sysrepo.c
+++ b/lib/northbound_sysrepo.c
@@ -515,7 +515,7 @@ static int frr_sr_notification_send(const char *xpath, struct list *arguments)
}
}
- ret = sr_event_notif_send(session, xpath, values, values_cnt, 0, 0);
+ ret = sr_notif_send(session, xpath, values, values_cnt, 0, 0);
if (ret != SR_ERR_OK) {
flog_err(EC_LIB_LIBSYSREPO,
"%s: sr_event_notif_send() failed for xpath %s",
@@ -532,7 +532,8 @@ static void frr_sr_read_cb(struct thread *thread)
int fd = THREAD_FD(thread);
int ret;
- ret = sr_process_events(module->sr_subscription, session, NULL);
+ ret = sr_subscription_process_events(module->sr_subscription, session,
+ NULL);
if (ret != SR_ERR_OK) {
flog_err(EC_LIB_LIBSYSREPO, "%s: sr_fd_event_process(): %s",
__func__, sr_strerror(ret));
@@ -578,9 +579,9 @@ static int frr_sr_subscribe_state(const struct lysc_node *snode, void *arg)
DEBUGD(&nb_dbg_client_sysrepo, "sysrepo: providing data to '%s'",
nb_node->xpath);
- ret = sr_oper_get_items_subscribe(
- session, snode->module->name, nb_node->xpath, frr_sr_state_cb,
- NULL, SR_SUBSCR_CTX_REUSE, &module->sr_subscription);
+ ret = sr_oper_get_subscribe(session, snode->module->name,
+ nb_node->xpath, frr_sr_state_cb, NULL, 0,
+ &module->sr_subscription);
if (ret != SR_ERR_OK)
flog_err(EC_LIB_LIBSYSREPO, "sr_oper_get_items_subscribe(): %s",
sr_strerror(ret));
@@ -605,8 +606,7 @@ static int frr_sr_subscribe_rpc(const struct lysc_node *snode, void *arg)
nb_node->xpath);
ret = sr_rpc_subscribe(session, nb_node->xpath, frr_sr_config_rpc_cb,
- NULL, 0, SR_SUBSCR_CTX_REUSE,
- &module->sr_subscription);
+ NULL, 0, 0, &module->sr_subscription);
if (ret != SR_ERR_OK)
flog_err(EC_LIB_LIBSYSREPO, "sr_rpc_subscribe(): %s",
sr_strerror(ret));