lib: graph.c: call bt_graph_consume_no_check() in bt_graph_run()
[babeltrace.git] / lib / graph / graph.c
index 7b013d358b9d2d03223ea5cdf848aa2ca4153111..cb197eed098414eba0698773c2823f5aec41d802 100644 (file)
@@ -529,7 +529,7 @@ enum bt_graph_status bt_graph_run(struct bt_graph *graph)
                        goto end;
                }
 
-               status = bt_graph_consume(graph);
+               status = bt_graph_consume_no_check(graph);
                if (status == BT_GRAPH_STATUS_AGAIN) {
                        /*
                         * If AGAIN is received and there are multiple
@@ -808,7 +808,7 @@ void bt_graph_notify_ports_disconnected(struct bt_graph *graph,
        }
 }
 
-extern enum bt_graph_status bt_graph_cancel(struct bt_graph *graph)
+enum bt_graph_status bt_graph_cancel(struct bt_graph *graph)
 {
        enum bt_graph_status ret = BT_GRAPH_STATUS_OK;
 
@@ -825,9 +825,19 @@ end:
        return ret;
 }
 
-extern bt_bool bt_graph_is_canceled(struct bt_graph *graph)
+bt_bool bt_graph_is_canceled(struct bt_graph *graph)
 {
-       return graph ? graph->canceled : BT_FALSE;
+       bt_bool canceled = BT_FALSE;
+
+       if (!graph) {
+               BT_LOGW_STR("Invalid parameter: graph is NULL.");
+               goto end;
+       }
+
+       canceled = graph->canceled;
+
+end:
+       return canceled;
 }
 
 BT_HIDDEN
This page took 0.026067 seconds and 4 git commands to generate.