Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions subsys/bluetooth/host/gatt.c
Original file line number Diff line number Diff line change
Expand Up @@ -2012,8 +2012,9 @@ static u8_t update_ccc(const struct bt_gatt_attr *attr, void *user_data)
ccc = attr->user_data;

for (i = 0; i < ARRAY_SIZE(ccc->cfg); i++) {
/* Ignore configuration for different peer */
if (bt_conn_addr_le_cmp(conn, &ccc->cfg[i].peer)) {
/* Ignore configuration for different peer or not active */
if (!ccc->cfg[i].value ||
bt_conn_addr_le_cmp(conn, &ccc->cfg[i].peer)) {
continue;
}

Expand Down Expand Up @@ -2043,14 +2044,14 @@ static u8_t update_ccc(const struct bt_gatt_attr *attr, void *user_data)
}
}

if (ccc->cfg[i].value) {
gatt_ccc_changed(attr, ccc);
if (IS_ENABLED(CONFIG_BT_GATT_SERVICE_CHANGED) &&
ccc == &sc_ccc) {
sc_restore(conn);
}
return BT_GATT_ITER_CONTINUE;
gatt_ccc_changed(attr, ccc);

if (IS_ENABLED(CONFIG_BT_GATT_SERVICE_CHANGED) &&
ccc == &sc_ccc) {
sc_restore(conn);
}

return BT_GATT_ITER_CONTINUE;
}

return BT_GATT_ITER_CONTINUE;
Expand Down