lib: do not allow port to be removed when message iterators are active
[babeltrace.git] / lib / graph / graph.c
index 19682e4581f6eeeaaccd8bfdc867c88a8cece959..f28954188a3659764e3c04a6cc0c626ff57944e9 100644 (file)
@@ -118,11 +118,11 @@ void destroy_graph(struct bt_object *obj)
         * in this situation:
         *
         * 1. We put and destroy a connection.
-        * 2. This connection's destructor finalizes its active
-        *    message iterators.
-        * 3. A message iterator's finalization function gets a
-        *    new reference on its component (reference count goes from
-        *    0 to 1).
+        * 2. This connection's destructor finalizes its active message
+        *    iterators.
+        * 3. A message iterator's finalization function gets a new
+        *    reference on its component (reference count goes from 0 to
+        *    1).
         * 4. Since this component's reference count goes to 1, it takes
         *    a reference on its parent (this graph). This graph's
         *    reference count goes from 0 to 1.
@@ -131,8 +131,8 @@ void destroy_graph(struct bt_object *obj)
         * 6. Since this component's reference count goes from 1 to 0,
         *    it puts its parent (this graph). This graph's reference
         *    count goes from 1 to 0.
-        * 7. Since this graph's reference count goes from 1 to 0,
-        *    its destructor is called (this function).
+        * 7. Since this graph's reference count goes from 1 to 0, its
+        *    destructor is called (this function).
         *
         * With the incrementation below, the graph's reference count at
         * step 4 goes from 1 to 2, and from 2 to 1 at step 6. This
@@ -640,7 +640,7 @@ enum bt_graph_status bt_graph_connect_ports(
                goto end;
        }
 
-       connection->msgied_upstream_port_connected = true;
+       connection->notified_upstream_port_connected = true;
        BT_LIB_LOGD("Notifying downstream component that its port is connected: "
                "%![comp-]+c, %![port-]+p", downstream_component,
                downstream_port);
@@ -658,14 +658,14 @@ enum bt_graph_status bt_graph_connect_ports(
                goto end;
        }
 
-       connection->msgied_downstream_port_connected = true;
+       connection->notified_downstream_port_connected = true;
 
        /*
         * Notify the graph's creator that both ports are connected.
         */
        BT_LOGD_STR("Notifying graph's user that new component ports are connected.");
        bt_graph_notify_ports_connected(graph, upstream_port, downstream_port);
-       connection->msgied_graph_ports_connected = true;
+       connection->notified_graph_ports_connected = true;
        BT_LIB_LOGD("Connected component ports within graph: "
                "%![graph-]+g, %![up-comp-]+c, %![down-comp-]+c, "
                "%![up-port-]+p, %![down-port-]+p",
This page took 0.025248 seconds and 4 git commands to generate.