Bluetooth: host: Add check for already enabled in advertising set start

Add check for the advertising already being enabled when attempting to
start the advertising set.
Document that the advertising set cannot be started from the connection
connected callback, and instead has to be started from the advertising
set connected callback.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This commit is contained in:
Joakim Andersson 2021-05-21 13:37:06 +02:00 committed by Carles Cufí
commit c429ffb0ed
2 changed files with 9 additions and 0 deletions

View file

@ -769,6 +769,11 @@ struct bt_conn_cb {
* In case the err parameter is non-zero it means that the
* connection establishment failed.
*
* @note If the connection was established from an advertising set then
* the advertising set cannot be restarted directly from this
* callback. Instead use the connected callback of the
* advertising set.
*
* @param conn New connection object.
* @param err HCI error. Zero for success, non-zero otherwise.
*