Skip to content

Commit

Permalink
Bluetooth: host: Fix SC indication on encrypt change
Browse files Browse the repository at this point in the history
The SC indication can be sent only if the GATT Service Changed is
enabled in the configuration. Change fixes build issues related to
implicit sc_indicate declaration when Service Changed is disabled.

Fixes: zephyrproject-rtos#54813

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
  • Loading branch information
MarekPieta committed Feb 14, 2023
1 parent 31c11a5 commit 5231a33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion subsys/bluetooth/host/gatt.c
Expand Up @@ -5712,7 +5712,7 @@ void bt_gatt_encrypt_change(struct bt_conn *conn)

bt_gatt_foreach_attr(0x0001, 0xffff, update_ccc, &data);

#if defined(CONFIG_BT_SETTINGS)
#if defined(CONFIG_BT_SETTINGS) && defined(CONFIG_BT_GATT_SERVICE_CHANGED)
if (!bt_gatt_change_aware(conn, false)) {
/* Send a Service Changed indication if the current peer is
* marked as change-unaware.
Expand Down

0 comments on commit 5231a33

Please sign in to comment.