return 0;
case LYS_LEAF:
sleaf = (struct lysc_node_leaf *)snode;
- type = sleaf->type.base;
+ type = sleaf->type->basetype;
break;
case LYS_LEAFLIST:
sleaflist = (struct lysc_node_leaflist *)snode;
- type = sleaflist->type.base;
+ type = sleaflist->type->basetype;
break;
default:
return -1;
case NB_ERR_LOCKED:
return SR_ERR_LOCKED;
case NB_ERR_RESOURCE:
- return SR_ERR_NOMEM;
+ return SR_ERR_NO_MEMORY;
default:
return SR_ERR_VALIDATION_FAILED;
}
}
/* Callback for changes in the running configuration. */
-static int frr_sr_config_change_cb(sr_session_ctx_t *session,
+static int frr_sr_config_change_cb(sr_session_ctx_t *session, uint32_t sub_id,
const char *module_name, const char *xpath,
sr_event_t sr_ev, uint32_t request_id,
void *private_data)
struct yang_data *data, void *arg)
{
struct lyd_node *dnode = arg;
+ LY_ERR ly_errno;
ly_errno = 0;
- dnode = lyd_new_path(dnode, ly_native_ctx, data->xpath, data->value, 0,
- LYD_PATH_OPT_UPDATE);
+ ly_errno = lyd_new_path(NULL, ly_native_ctx, data->xpath, data->value,
+ 0, &dnode);
if (!dnode && ly_errno) {
flog_warn(EC_LIB_LIBYANG, "%s: lyd_new_path() failed",
__func__);
}
/* Callback for state retrieval. */
-static int frr_sr_state_cb(sr_session_ctx_t *session, const char *module_name,
- const char *xpath, const char *request_xpath,
- uint32_t request_id, struct lyd_node **parent,
- void *private_ctx)
+static int frr_sr_state_cb(sr_session_ctx_t *session, uint32_t sub_id,
+ const char *module_name, const char *xpath,
+ const char *request_xpath, uint32_t request_id,
+ struct lyd_node **parent, void *private_ctx)
{
struct lyd_node *dnode;
return SR_ERR_OK;
}
-
-static int frr_sr_config_rpc_cb(sr_session_ctx_t *session, const char *xpath,
- const sr_val_t *sr_input,
+static int frr_sr_config_rpc_cb(sr_session_ctx_t *session, uint32_t sub_id,
+ const char *xpath, const sr_val_t *sr_input,
const size_t input_cnt, sr_event_t sr_ev,
uint32_t request_id, sr_val_t **sr_output,
size_t *sr_output_cnt, void *private_ctx)
}
}
- ret = sr_event_notif_send(session, xpath, values, values_cnt);
+ ret = sr_event_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",