ret = bt_private_stream_class_set_default_clock_class(
dmesg_comp->stream_class,
- bt_private_clock_class_borrow_clock_class(
+ bt_private_clock_class_as_clock_class(
dmesg_comp->clock_class));
if (ret) {
BT_LOGE_STR("Cannot set stream class's default clock class.");
}
static
-int handle_params(struct dmesg_component *dmesg_comp, struct bt_value *params)
+int handle_params(struct dmesg_component *dmesg_comp,
+ const struct bt_value *params)
{
- struct bt_value *no_timestamp = NULL;
- struct bt_value *path = NULL;
+ const struct bt_value *no_timestamp = NULL;
+ const struct bt_value *path = NULL;
const char *path_str;
int ret = 0;
- no_timestamp = bt_value_map_borrow_entry_value(params,
+ no_timestamp = bt_value_map_borrow_entry_value_const(params,
"no-extract-timestamp");
if (no_timestamp) {
if (!bt_value_is_bool(no_timestamp)) {
bt_value_bool_get(no_timestamp);
}
- path = bt_value_map_borrow_entry_value(params, "path");
+ path = bt_value_map_borrow_entry_value_const(params, "path");
if (path) {
if (dmesg_comp->params.read_from_stdin) {
BT_LOGE_STR("Cannot specify both `read-from-stdin` and `path` parameters.");
}
bt_self_component_set_data(
- bt_self_component_source_borrow_self_component(self_comp),
+ bt_self_component_source_as_self_component(self_comp),
dmesg_comp);
goto end;
error:
destroy_dmesg_component(dmesg_comp);
bt_self_component_set_data(
- bt_self_component_source_borrow_self_component(self_comp),
+ bt_self_component_source_as_self_component(self_comp),
NULL);
if (status >= 0) {
void dmesg_finalize(struct bt_self_component_source *self_comp)
{
destroy_dmesg_component(bt_self_component_get_data(
- bt_self_component_source_borrow_self_component(self_comp)));
+ bt_self_component_source_as_self_component(self_comp)));
}
static
BT_ASSERT(event);
if (dmesg_comp->clock_class) {
- ret = bt_private_event_set_default_clock_value(event, ts);
- BT_ASSERT(ret == 0);
+ bt_private_event_set_default_clock_value(event, ts);
}
goto end;
}
dmesg_comp = bt_self_component_get_data(
- bt_self_component_source_borrow_self_component(self_comp));
+ bt_self_component_source_as_self_component(self_comp));
BT_ASSERT(dmesg_comp);
dmesg_notif_iter->dmesg_comp = dmesg_comp;
dmesg_notif_iter->pc_notif_iter = self_notif_iter;
status = dmesg_notif_iter_next_one(dmesg_notif_iter,
&priv_notif);
- notifs[i] = bt_private_notification_borrow_notification(
+ notifs[i] = bt_private_notification_as_notification(
priv_notif);
if (status == BT_SELF_NOTIFICATION_ITERATOR_STATUS_OK) {
i++;