X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Flib%2Fgraph%2Fgraph.c;h=af6b2b2dc804a973d1ce6540e9013744cc4017bf;hb=b70d57a123c4e4a208b988539a7eb8fceb2b63a7;hp=cf112fbd8393907c0f7a8f5637188fadeec0f606;hpb=870631a2db01676b476dbee615aade0a22926bcd;p=babeltrace.git diff --git a/src/lib/graph/graph.c b/src/lib/graph/graph.c index cf112fbd..af6b2b2d 100644 --- a/src/lib/graph/graph.c +++ b/src/lib/graph/graph.c @@ -564,7 +564,7 @@ int consume_graph_sink(struct bt_component_sink *comp) consume_status = sink_class->methods.consume((void *) comp); BT_LOGD("User method returned: status=%s", bt_common_func_status_string(consume_status)); - BT_ASSERT_POST(consume_status == BT_FUNC_STATUS_OK || + BT_ASSERT_POST_DEV(consume_status == BT_FUNC_STATUS_OK || consume_status == BT_FUNC_STATUS_END || consume_status == BT_FUNC_STATUS_AGAIN || consume_status == BT_FUNC_STATUS_ERROR || @@ -663,7 +663,7 @@ int consume_no_check(struct bt_graph *graph) struct bt_component *sink; GList *current_node; - BT_ASSERT_PRE(graph->has_sink, + BT_ASSERT_PRE_DEV(graph->has_sink, "Graph has no sink component: %!+g", graph); BT_LIB_LOGD("Making next sink component consume: %![graph-]+g", graph); @@ -686,11 +686,12 @@ enum bt_graph_consume_status bt_graph_consume(struct bt_graph *graph) { enum bt_graph_consume_status status; - BT_ASSERT_PRE_NON_NULL(graph, "Graph"); - BT_ASSERT_PRE(!graph->canceled, "Graph is canceled: %!+g", graph); - BT_ASSERT_PRE(graph->can_consume, + BT_ASSERT_PRE_DEV_NON_NULL(graph, "Graph"); + BT_ASSERT_PRE_DEV(!graph->canceled, "Graph is canceled: %!+g", graph); + BT_ASSERT_PRE_DEV(graph->can_consume, "Cannot consume graph in its current state: %!+g", graph); - BT_ASSERT_PRE(graph->config_state != BT_GRAPH_CONFIGURATION_STATE_FAULTY, + BT_ASSERT_PRE_DEV(graph->config_state != + BT_GRAPH_CONFIGURATION_STATE_FAULTY, "Graph is in a faulty state: %!+g", graph); bt_graph_set_can_consume(graph, false); status = bt_graph_configure(graph); @@ -1218,7 +1219,7 @@ enum bt_graph_cancel_status bt_graph_cancel(struct bt_graph *graph) bt_bool bt_graph_is_canceled(const struct bt_graph *graph) { - BT_ASSERT_PRE_NON_NULL(graph, "Graph"); + BT_ASSERT_PRE_DEV_NON_NULL(graph, "Graph"); return graph->canceled ? BT_TRUE : BT_FALSE; } @@ -1233,7 +1234,6 @@ void bt_graph_remove_connection(struct bt_graph *graph, g_ptr_array_remove(graph->connections, connection); } -BT_ASSERT_PRE_FUNC static inline bool component_name_exists(struct bt_graph *graph, const char *name) {