Bluetooth: GATT: Fix missing connection address comparison

When receiving notifications we should be properly matching against
the remote address of subscribed peers.

Change-Id: Ibcba1101aac418fd02f9068667f84e8294aade07
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2017-01-12 14:27:29 +02:00
commit a54292afc9

View file

@ -716,6 +716,10 @@ void bt_gatt_notification(struct bt_conn *conn, uint16_t handle,
BT_DBG("handle 0x%04x length %u", handle, length);
for (params = subscriptions; params; params = params->_next) {
if (bt_conn_addr_le_cmp(conn, &params->_peer)) {
continue;
}
if (handle != params->value_handle) {
continue;
}