Commit Graph

3 Commits

Author SHA1 Message Date
Pavel Vasilyev 8acb1cc577 bluetooth: host: conn: Check if *conn is not NULL
This commit adds a warning and a Kconfig option to `bt_conn_le_create`
and `bt_conn_le_create_synced` functions which are meant to warn a user
of a potential leakage of an active connection object.

This change is implemented due to frequent incorrect use of the
connection pointer where a pointer to an existing connection object
is overwritten by `bt_conn_le_create` and `bt_conn_le_create_synced`
functions which in turns leads to sporadic critical bugs. See
https://github.com/zephyrproject-rtos/zephyr/pull/78284#discussion_r1754304535
for more details.

The Kconfig option is introduced instead of always returning the error
to not affect current implementations. However, it is recommended to
keep this option enabled to avoid potential bugs.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-10-18 17:46:04 +01:00
Hanf Gai b8d3e9c50e doc: connectivity: bluetooth: sync function name
sync function name `bt_conn_le_create` with the code.

Signed-off-by: Hanf Gai <gaihanfu@live.com>
2023-03-21 18:09:03 +00:00
Anas Nashif 12ddf99782 doc: move bluetooth under connectivity
Create a new section 'Connectivity' and move Bluetooth guides and API
docs to this new section.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-04-07 16:35:19 +02:00