lib: mark graph as faulty when adding a comp. or connecting ports fails
[babeltrace.git] / include / babeltrace / graph / graph-internal.h
index 97289cf0f168e4b36d349845a5b0de199e46e34f..83812e7b51e7dda437d4a8aa6cc8710aa1c61347 100644 (file)
@@ -43,6 +43,7 @@ enum bt_graph_configuration_state {
        BT_GRAPH_CONFIGURATION_STATE_CONFIGURING,
        BT_GRAPH_CONFIGURATION_STATE_PARTIALLY_CONFIGURED,
        BT_GRAPH_CONFIGURATION_STATE_CONFIGURED,
+       BT_GRAPH_CONFIGURATION_STATE_FAULTY,
 };
 
 struct bt_graph {
@@ -211,6 +212,8 @@ enum bt_graph_status bt_graph_configure(struct bt_graph *graph)
        enum bt_graph_status status = BT_GRAPH_STATUS_OK;
        uint64_t i;
 
+       BT_ASSERT(graph->config_state != BT_GRAPH_CONFIGURATION_STATE_FAULTY);
+
        if (likely(graph->config_state ==
                        BT_GRAPH_CONFIGURATION_STATE_CONFIGURED)) {
                goto end;
This page took 0.022668 seconds and 4 git commands to generate.