Quickly indicates if a connection is ended without having to get and
puts its individual endpoint ports.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
extern struct bt_port *bt_connection_get_upstream_port(
struct bt_connection *connection);
+extern bt_bool bt_connection_is_ended(struct bt_connection *connection);
+
#ifdef __cplusplus
}
#endif
"conn-addr=%p, iter-addr=%p", conn, iterator);
bt_connection_try_remove_from_graph(conn);
}
+
+bt_bool bt_connection_is_ended(struct bt_connection *connection)
+{
+ return !connection->downstream_port && !connection->upstream_port;
+}