struct bt_connection *connection = container_of(obj,
struct bt_connection, base);
struct bt_connection *connection = container_of(obj,
struct bt_connection, base);
/*
* Make sure that each message iterator which was created for
* this connection is finalized before we destroy it. Once a
/*
* Make sure that each message iterator which was created for
* this connection is finalized before we destroy it. Once a
*
* Because connections are destroyed before components within a
* graph, this ensures that message iterators are always
*
* Because connections are destroyed before components within a
* graph, this ensures that message iterators are always
"%![graph-]+g, %![up-port-]+p, %![down-port-]+p",
graph, upstream_port, downstream_port);
connection = g_new0(struct bt_connection, 1);
if (!connection) {
"%![graph-]+g, %![up-port-]+p, %![down-port-]+p",
graph, upstream_port, downstream_port);
connection = g_new0(struct bt_connection, 1);
if (!connection) {
downstream_port);
bt_port_set_connection(downstream_port, connection);
bt_object_set_parent(&connection->base, &graph->base);
downstream_port);
bt_port_set_connection(downstream_port, connection);
bt_object_set_parent(&connection->base, &graph->base);
g_ptr_array_index(conn->iterators, i);
BT_LIB_LOGD("Finalizing message iterator created by "
"this ended connection: %![iter-]+i", iterator);
g_ptr_array_index(conn->iterators, i);
BT_LIB_LOGD("Finalizing message iterator created by "
"this ended connection: %![iter-]+i", iterator);
const struct bt_port_output *bt_connection_borrow_upstream_port_const(
const struct bt_connection *connection)
{
const struct bt_port_output *bt_connection_borrow_upstream_port_const(
const struct bt_connection *connection)
{
return (void *) connection->upstream_port;
}
const struct bt_port_input *bt_connection_borrow_downstream_port_const(
const struct bt_connection *connection)
{
return (void *) connection->upstream_port;
}
const struct bt_port_input *bt_connection_borrow_downstream_port_const(
const struct bt_connection *connection)
{
return (void *) connection->downstream_port;
}
BT_HIDDEN
void bt_connection_remove_iterator(struct bt_connection *conn,
return (void *) connection->downstream_port;
}
BT_HIDDEN
void bt_connection_remove_iterator(struct bt_connection *conn,
"%![conn-]+x, %![iter-]+i", conn, iterator);
try_remove_connection_from_graph(conn);
}
"%![conn-]+x, %![iter-]+i", conn, iterator);
try_remove_connection_from_graph(conn);
}