File tree Expand file tree Collapse file tree 4 files changed +19
-3
lines changed Expand file tree Collapse file tree 4 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,7 @@ New APIs and options
95
95
* :c:func: `bt_le_get_local_features `
96
96
* :c:func: `bt_le_bond_exists `
97
97
* :c:func: `bt_br_bond_exists `
98
+ * :c:func: `bt_conn_lookup_addr_br `
98
99
99
100
* Display
100
101
Original file line number Diff line number Diff line change @@ -2618,6 +2618,19 @@ struct bt_br_conn_param {
2618
2618
struct bt_conn * bt_conn_create_br (const bt_addr_t * peer ,
2619
2619
const struct bt_br_conn_param * param );
2620
2620
2621
+ /** @brief Look up an existing BR connection by address.
2622
+ *
2623
+ * Look up an existing BR connection based on the remote address.
2624
+ *
2625
+ * The caller gets a new reference to the connection object which must be
2626
+ * released with bt_conn_unref() once done using the object.
2627
+ *
2628
+ * @param peer Remote address.
2629
+ *
2630
+ * @return Connection object or NULL if not found.
2631
+ */
2632
+ struct bt_conn * bt_conn_lookup_addr_br (const bt_addr_t * peer );
2633
+
2621
2634
#ifdef __cplusplus
2622
2635
}
2623
2636
#endif
Original file line number Diff line number Diff line change @@ -2391,6 +2391,11 @@ struct bt_conn *bt_conn_lookup_addr_br(const bt_addr_t *peer)
2391
2391
{
2392
2392
int i ;
2393
2393
2394
+ if (peer == NULL ) {
2395
+ LOG_DBG ("Invalid peer address" );
2396
+ return NULL ;
2397
+ }
2398
+
2394
2399
for (i = 0 ; i < ARRAY_SIZE (acl_conns ); i ++ ) {
2395
2400
struct bt_conn * conn = bt_conn_ref (& acl_conns [i ]);
2396
2401
Original file line number Diff line number Diff line change @@ -423,9 +423,6 @@ void bt_sco_cleanup(struct bt_conn *sco_conn);
423
423
/* Look up an existing sco connection by BT address */
424
424
struct bt_conn * bt_conn_lookup_addr_sco (const bt_addr_t * peer );
425
425
426
- /* Look up an existing connection by BT address */
427
- struct bt_conn * bt_conn_lookup_addr_br (const bt_addr_t * peer );
428
-
429
426
void bt_conn_disconnect_all (uint8_t id );
430
427
431
428
/* Allocate new connection object */
You can’t perform that action at this time.
0 commit comments