int cmd_run_ctx_init(struct cmd_run_ctx *ctx, struct bt_config *cfg)
{
int ret = 0;
- bt_graph_add_component_status add_comp_status;
+ bt_graph_add_listener_status add_listener_status;
ctx->cfg = cfg;
ctx->connect_ports = false;
}
the_graph = ctx->graph;
- add_comp_status = bt_graph_add_source_component_output_port_added_listener(
+ add_listener_status = bt_graph_add_source_component_output_port_added_listener(
ctx->graph, graph_source_output_port_added_listener, NULL, ctx,
NULL);
- if (add_comp_status != BT_GRAPH_ADD_COMPONENT_STATUS_OK) {
+ if (add_listener_status != BT_GRAPH_ADD_LISTENER_STATUS_OK) {
BT_LOGE_STR("Cannot add \"port added\" listener to graph.");
goto error;
}
- add_comp_status = bt_graph_add_filter_component_output_port_added_listener(
+ add_listener_status = bt_graph_add_filter_component_output_port_added_listener(
ctx->graph, graph_filter_output_port_added_listener, NULL, ctx,
NULL);
- if (add_comp_status != BT_GRAPH_ADD_COMPONENT_STATUS_OK) {
+ if (add_listener_status != BT_GRAPH_ADD_LISTENER_STATUS_OK) {
BT_LOGE_STR("Cannot add \"port added\" listener to graph.");
goto error;
}
struct bt_self_component_sink *self_comp,
const struct bt_value *params, void *init_method_data)
{
- enum bt_component_class_init_method_status status =
- BT_FUNC_STATUS_OK;
+ int status = BT_FUNC_STATUS_OK;
struct bt_component_class_sink_colander_priv_data *colander_data = NULL;
struct bt_component_class_sink_colander_data *user_provided_data =
init_method_data;
typedef enum bt_component_class_port_connected_method_status (*method_t)(
void *, void *, const void *);
- enum bt_self_component_add_port_status status =
+ enum bt_component_class_port_connected_method_status status =
BT_FUNC_STATUS_OK;
method_t method = NULL;
bt_self_component_port_input_message_iterator_seek_beginning(
struct bt_self_component_port_input_message_iterator *iterator)
{
- enum bt_message_iterator_seek_beginning_status status;
+ int status;
BT_ASSERT_PRE_NON_NULL(iterator, "Message iterator");
BT_ASSERT_PRE_ITER_HAS_STATE_TO_SEEK(iterator);
self_comp = port_data->ctf_fs->self_comp;
msg_iter_data = g_new0(struct ctf_fs_msg_iter_data, 1);
if (!msg_iter_data) {
- ret = BT_COMPONENT_CLASS_MESSAGE_ITERATOR_NEXT_METHOD_STATUS_MEMORY_ERROR;
+ ret = BT_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_STATUS_MEMORY_ERROR;
goto error;
}
bt_self_component_sink_borrow_input_port_by_name(comp,
in_port_name));
if (!pretty->iterator) {
- status = BT_COMPONENT_CLASS_MESSAGE_ITERATOR_NEXT_METHOD_STATUS_MEMORY_ERROR;
+ status = BT_COMPONENT_CLASS_SINK_GRAPH_IS_CONFIGURED_METHOD_STATUS_ERROR;
}
return status;
BT_ASSERT(next_status == BT_MESSAGE_ITERATOR_NEXT_STATUS_OK);
for (i = 0; i < count; i++) {
- ret = handle_message(pretty, msgs[i]);
+ ret = (int) handle_message(pretty, msgs[i]);
if (ret) {
goto end;
}
struct trimmer_iterator *trimmer_it)
{
bt_message_iterator_next_status upstream_iter_status =
- BT_COMPONENT_CLASS_MESSAGE_ITERATOR_NEXT_METHOD_STATUS_OK;
+ BT_MESSAGE_ITERATOR_NEXT_STATUS_OK;
struct trimmer_comp *trimmer_comp = trimmer_it->trimmer_comp;
bt_message_array_const msgs;
uint64_t count = 0;
error:
put_messages(msgs, count);
- upstream_iter_status =
- BT_COMPONENT_CLASS_MESSAGE_ITERATOR_NEXT_METHOD_STATUS_ERROR;
+ upstream_iter_status = BT_MESSAGE_ITERATOR_NEXT_STATUS_ERROR;
end:
return (int) upstream_iter_status;