From: Philippe Proulx Date: Mon, 5 Aug 2019 21:57:27 +0000 (-0400) Subject: Fix: src/lib/graph/graph.h: do not override `comp_status` value X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=0439079563d4c56d3aa93ffe7d4a721d761a3a23;p=babeltrace.git Fix: src/lib/graph/graph.h: do not override `comp_status` value This made, for example, bt_graph_run() return `BT_GRAPH_RUN_STATUS_ERROR` when the sink component's "graph is configured" method returned `BT_COMPONENT_CLASS_SINK_GRAPH_IS_CONFIGURED_METHOD_STATUS_MEMORY_ERROR`, therefore not percolating the correct status. Signed-off-by: Philippe Proulx Change-Id: Ic89d9315f8bc1c3226a14955c9e6419462d5e588 Reviewed-on: https://review.lttng.org/c/babeltrace/+/1829 Reviewed-by: Simon Marchi Reviewed-by: Francis Deslauriers --- diff --git a/src/lib/graph/graph.h b/src/lib/graph/graph.h index 2f189f83..5cda8a1d 100644 --- a/src/lib/graph/graph.h +++ b/src/lib/graph/graph.h @@ -266,7 +266,6 @@ int bt_graph_configure(struct bt_graph *graph) "Unexpected returned status: status=%s", bt_common_func_status_string(comp_status)); if (comp_status != BT_FUNC_STATUS_OK) { - comp_status = BT_FUNC_STATUS_ERROR; if (comp_status < 0) { BT_LIB_LOGW_APPEND_CAUSE( "Component's \"graph is configured\" method failed: "