goto end;
error:
- BT_PUT(root_fc);
+ BT_OBJECT_PUT_REF_AND_RESET(root_fc);
end:
- bt_put(fc);
+ bt_object_put_ref(fc);
return root_fc;
}
ret = -1;
end:
- bt_put(fc);
+ bt_object_put_ref(fc);
if (basename) {
g_free(basename);
static
int handle_params(struct dmesg_component *dmesg_comp, struct bt_value *params)
{
- struct bt_value *read_from_stdin = NULL;
struct bt_value *no_timestamp = NULL;
struct bt_value *path = NULL;
const char *path_str;
int ret = 0;
- no_timestamp = bt_value_map_get(params, "no-extract-timestamp");
+ no_timestamp = bt_value_map_borrow_entry_value(params,
+ "no-extract-timestamp");
if (no_timestamp) {
if (!bt_value_is_bool(no_timestamp)) {
BT_LOGE("Expecting a boolean value for the `no-extract-timestamp` parameter: "
BT_ASSERT(ret == 0);
}
- path = bt_value_map_get(params, "path");
+ path = bt_value_map_borrow_entry_value(params, "path");
if (path) {
if (dmesg_comp->params.read_from_stdin) {
BT_LOGE_STR("Cannot specify both `read-from-stdin` and `path` parameters.");
ret = -1;
end:
- bt_put(read_from_stdin);
- bt_put(path);
- bt_put(no_timestamp);
return ret;
}
g_string_free(dmesg_comp->params.path, TRUE);
}
- bt_put(dmesg_comp->packet);
- bt_put(dmesg_comp->trace);
- bt_put(dmesg_comp->stream_class);
- bt_put(dmesg_comp->event_class);
- bt_put(dmesg_comp->stream);
- bt_put(dmesg_comp->clock_class);
- bt_put(dmesg_comp->cc_prio_map);
+ bt_object_put_ref(dmesg_comp->packet);
+ bt_object_put_ref(dmesg_comp->trace);
+ bt_object_put_ref(dmesg_comp->stream_class);
+ bt_object_put_ref(dmesg_comp->event_class);
+ bt_object_put_ref(dmesg_comp->stream);
+ bt_object_put_ref(dmesg_comp->clock_class);
+ bt_object_put_ref(dmesg_comp->cc_prio_map);
g_free(dmesg_comp);
}
goto end;
error:
- BT_PUT(notif);
+ BT_OBJECT_PUT_REF_AND_RESET(notif);
end:
return notif;
goto end;
error:
- BT_PUT(notif);
+ BT_OBJECT_PUT_REF_AND_RESET(notif);
end:
return notif;
}
}
- bt_put(dmesg_notif_iter->tmp_event_notif);
+ bt_object_put_ref(dmesg_notif_iter->tmp_event_notif);
free(dmesg_notif_iter->linebuf);
g_free(dmesg_notif_iter);
}
}
end:
- bt_put(priv_comp);
+ bt_object_put_ref(priv_comp);
return status;
}