mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-29 14:40:47 +00:00
Merge pull request #11378 from ton31337/fix/compile_sysrepo
lib: sysrepo compilation issues
This commit is contained in:
commit
1d044370a9
@ -1970,7 +1970,7 @@ dnl ---------------
|
|||||||
dnl sysrepo
|
dnl sysrepo
|
||||||
dnl ---------------
|
dnl ---------------
|
||||||
if test "$enable_sysrepo" = "yes"; then
|
if test "$enable_sysrepo" = "yes"; then
|
||||||
PKG_CHECK_MODULES([SYSREPO], [sysrepo],
|
PKG_CHECK_MODULES([SYSREPO], [sysrepo >= 2.1.42],
|
||||||
[AC_DEFINE([HAVE_SYSREPO], [1], [Enable sysrepo integration])
|
[AC_DEFINE([HAVE_SYSREPO], [1], [Enable sysrepo integration])
|
||||||
SYSREPO=true],
|
SYSREPO=true],
|
||||||
[SYSREPO=false
|
[SYSREPO=false
|
||||||
|
@ -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) {
|
if (ret != SR_ERR_OK) {
|
||||||
flog_err(EC_LIB_LIBSYSREPO,
|
flog_err(EC_LIB_LIBSYSREPO,
|
||||||
"%s: sr_event_notif_send() failed for xpath %s",
|
"%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 fd = THREAD_FD(thread);
|
||||||
int ret;
|
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) {
|
if (ret != SR_ERR_OK) {
|
||||||
flog_err(EC_LIB_LIBSYSREPO, "%s: sr_fd_event_process(): %s",
|
flog_err(EC_LIB_LIBSYSREPO, "%s: sr_fd_event_process(): %s",
|
||||||
__func__, sr_strerror(ret));
|
__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'",
|
DEBUGD(&nb_dbg_client_sysrepo, "sysrepo: providing data to '%s'",
|
||||||
nb_node->xpath);
|
nb_node->xpath);
|
||||||
|
|
||||||
ret = sr_oper_get_items_subscribe(
|
ret = sr_oper_get_subscribe(session, snode->module->name,
|
||||||
session, snode->module->name, nb_node->xpath, frr_sr_state_cb,
|
nb_node->xpath, frr_sr_state_cb, NULL, 0,
|
||||||
NULL, SR_SUBSCR_CTX_REUSE, &module->sr_subscription);
|
&module->sr_subscription);
|
||||||
if (ret != SR_ERR_OK)
|
if (ret != SR_ERR_OK)
|
||||||
flog_err(EC_LIB_LIBSYSREPO, "sr_oper_get_items_subscribe(): %s",
|
flog_err(EC_LIB_LIBSYSREPO, "sr_oper_get_items_subscribe(): %s",
|
||||||
sr_strerror(ret));
|
sr_strerror(ret));
|
||||||
@ -605,8 +606,7 @@ static int frr_sr_subscribe_rpc(const struct lysc_node *snode, void *arg)
|
|||||||
nb_node->xpath);
|
nb_node->xpath);
|
||||||
|
|
||||||
ret = sr_rpc_subscribe(session, nb_node->xpath, frr_sr_config_rpc_cb,
|
ret = sr_rpc_subscribe(session, nb_node->xpath, frr_sr_config_rpc_cb,
|
||||||
NULL, 0, SR_SUBSCR_CTX_REUSE,
|
NULL, 0, 0, &module->sr_subscription);
|
||||||
&module->sr_subscription);
|
|
||||||
if (ret != SR_ERR_OK)
|
if (ret != SR_ERR_OK)
|
||||||
flog_err(EC_LIB_LIBSYSREPO, "sr_rpc_subscribe(): %s",
|
flog_err(EC_LIB_LIBSYSREPO, "sr_rpc_subscribe(): %s",
|
||||||
sr_strerror(ret));
|
sr_strerror(ret));
|
||||||
|
Loading…
Reference in New Issue
Block a user