Adjust bt_component_borrow_class to match declaration
[babeltrace.git] / lib / graph / component.c
index 48454d649ca56ed4369664a74c075cccba135db2..6321762f032a8bc6804da82be455903b4daaee97 100644 (file)
@@ -204,7 +204,8 @@ struct bt_port *add_port(
        BT_ASSERT_PRE(graph && !bt_graph_is_canceled(graph),
                "Component's graph is canceled: %![comp-]+c, %![graph-]+g",
                component, graph);
-       BT_ASSERT_PRE(!graph->is_configured,
+       BT_ASSERT_PRE(
+               graph->config_state == BT_GRAPH_CONFIGURATION_STATE_CONFIGURING,
                "Component's graph is already configured: "
                "%![comp-]+c, %![graph-]+g", component, graph);
 
@@ -330,7 +331,7 @@ const char *bt_component_get_name(const struct bt_component *component)
        return component->name->str;
 }
 
-struct bt_component_class *bt_component_borrow_class(
+const struct bt_component_class *bt_component_borrow_class_const(
                const struct bt_component *component)
 {
        BT_ASSERT_PRE_NON_NULL(component, "Component");
This page took 0.029961 seconds and 4 git commands to generate.