Bluetooth: GATT: Improve notification code
Only checks if consolidated CCC value matches with data->type once. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
bc64c46e35
commit
737c50b50f
1 changed files with 3 additions and 4 deletions
|
@ -698,16 +698,15 @@ static u8_t notify_cb(const struct bt_gatt_attr *attr, void *user_data)
|
|||
}
|
||||
|
||||
ccc = attr->user_data;
|
||||
if (ccc->value != data->type) {
|
||||
return BT_GATT_ITER_CONTINUE;
|
||||
}
|
||||
|
||||
/* Notify all peers configured */
|
||||
for (i = 0; i < ccc->cfg_len; i++) {
|
||||
struct bt_conn *conn;
|
||||
int err;
|
||||
|
||||
if (ccc->value != data->type) {
|
||||
continue;
|
||||
}
|
||||
|
||||
conn = bt_conn_lookup_addr_le(&ccc->cfg[i].peer);
|
||||
if (!conn) {
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue