X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace%2Fgraph%2Fgraph-internal.h;h=ec2f65ecff9d2afd55ab548f84b2f539a4991530;hb=025502dfade7bc21beaf8f0bd0eff6c11e1fa3a8;hp=97289cf0f168e4b36d349845a5b0de199e46e34f;hpb=1043fdeac7af547a48ff5d938851dad9390aea4f;p=babeltrace.git diff --git a/include/babeltrace/graph/graph-internal.h b/include/babeltrace/graph/graph-internal.h index 97289cf0..ec2f65ec 100644 --- a/include/babeltrace/graph/graph-internal.h +++ b/include/babeltrace/graph/graph-internal.h @@ -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; @@ -258,6 +261,7 @@ enum bt_graph_status bt_graph_configure(struct bt_graph *graph) #endif if (comp_status != BT_SELF_COMPONENT_STATUS_OK) { + status = BT_GRAPH_STATUS_ERROR; #ifdef BT_LIB_LOGW BT_LIB_LOGW("User's \"graph is configured\" method failed: " "%![comp-]+c, status=%s",