Fix: lib: usage of output port message iterator
[babeltrace.git] / lib / graph / iterator.c
index 6a969826cc4da08a253d023360e01ead5851a99c..eba243739fdc07eeafcb0915f784936f884cb59b 100644 (file)
@@ -792,11 +792,14 @@ bt_port_output_message_iterator_create(struct bt_graph *graph,
         */
        bt_graph_set_can_consume(iterator->graph, false);
 
-       /*
-        * Also set the graph as being configured: it has no active sink
-        * anyway, so we don't need to call bt_graph_configure().
-        */
-       graph->config_state = BT_GRAPH_CONFIGURATION_STATE_CONFIGURED;
+       /* Also set the graph as being configured. */
+       graph_status = bt_graph_configure(graph);
+       if (graph_status != BT_GRAPH_STATUS_OK) {
+               BT_LIB_LOGW("Cannot configure graph after having added colander: "
+                       "%![graph-]+g, status=%s", graph,
+                       bt_graph_status_string(graph_status));
+               goto error;
+       }
        goto end;
 
 error:
This page took 0.023284 seconds and 4 git commands to generate.