X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=lib%2Fgraph%2Fiterator.c;fp=lib%2Fgraph%2Fiterator.c;h=51fa8d91f2b9d0f3170f53e4981e981858e55739;hb=4725a2013cb518374822ccb490610b45f74dbdbf;hp=95429fb509b9cfdfcb6940b345951addf6571f76;hpb=13d428598c645803f8745b6db2c6dc2cde5e33c4;p=babeltrace.git diff --git a/lib/graph/iterator.c b/lib/graph/iterator.c index 95429fb5..51fa8d91 100644 --- a/lib/graph/iterator.c +++ b/lib/graph/iterator.c @@ -751,6 +751,9 @@ bt_self_component_port_input_message_iterator_next( "iterator is in the wrong state: %!+i", iterator); BT_ASSERT(iterator->upstream_component); BT_ASSERT(iterator->upstream_component->class); + BT_ASSERT_PRE(bt_component_borrow_graph(iterator->upstream_component)->is_configured, + "Graph is not configured: %!+g", + bt_component_borrow_graph(iterator->upstream_component)); BT_LIB_LOGD("Getting next self component input port " "message iterator's messages: %!+i", iterator); comp_cls = iterator->upstream_component->class; @@ -843,6 +846,12 @@ enum bt_message_iterator_status bt_port_output_message_iterator_next( BT_LIB_LOGD("Getting next output port message iterator's messages: " "%!+i", iterator); + /* + * As soon as the user calls this function, we mark the graph as + * being definitely configured. + */ + bt_graph_set_is_configured(iterator->graph, true); + graph_status = bt_graph_consume_sink_no_check(iterator->graph, iterator->colander); switch (graph_status) {