Bluetooth: audio: tbs_client: Remove GATT subscriptions upon disconnection
As long as we do not have NVS support in TBS, the subscriptions shall be removed once ACL is disconnected to avoid potential crash on reconnection, as the subscription parameters might be not valid anymore. Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
This commit is contained in:
parent
2d593a1e8d
commit
a84ecc2f96
1 changed files with 1 additions and 0 deletions
|
@ -1509,6 +1509,7 @@ static uint8_t discover_func(struct bt_conn *conn,
|
|||
sub_params->ccc_handle = 0;
|
||||
sub_params->end_handle = current_inst->end_handle;
|
||||
sub_params->notify = notify_handler;
|
||||
atomic_set_bit(sub_params->flags, BT_GATT_SUBSCRIBE_FLAG_VOLATILE);
|
||||
err = bt_gatt_subscribe(conn, sub_params);
|
||||
if (err != 0) {
|
||||
LOG_DBG("Could not subscribe to "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue