lib: graph API: return borrowed references when adding to an object
[babeltrace.git] / src / lib / graph / graph.c
index 70d00c3de1d70dd03d20576b8868cf4acd3d5a44..9e7e8ffce188b0b156a067c40d0febb8d4365f0f 100644 (file)
@@ -433,7 +433,6 @@ enum bt_graph_connect_ports_status bt_graph_connect_ports(
        if (user_connection) {
                /* Move reference to user */
                *user_connection = connection;
-               connection = NULL;
        }
 
 end:
@@ -1020,7 +1019,6 @@ int add_component_with_init_method_data(
        if (user_component) {
                /* Move reference to user */
                *user_component = component;
-               component = NULL;
        }
 
 end:
@@ -1194,11 +1192,10 @@ enum bt_graph_add_interrupter_status bt_graph_add_interrupter(
        return BT_FUNC_STATUS_OK;
 }
 
-void bt_graph_interrupt(struct bt_graph *graph)
+struct bt_interrupter *bt_graph_borrow_default_interrupter(bt_graph *graph)
 {
        BT_ASSERT_PRE_NON_NULL(graph, "Graph");
-       bt_interrupter_set(graph->default_interrupter);
-       BT_LIB_LOGI("Interrupted graph: %!+g", graph);
+       return graph->default_interrupter;
 }
 
 void bt_graph_get_ref(const struct bt_graph *graph)
This page took 0.025647 seconds and 4 git commands to generate.