diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2017-01-12 14:27:29 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2017-01-12 21:10:53 +0200 |
commit | d568a04fbbf65652ab73dca7549234add973bb33 (patch) | |
tree | d4dff67e9e712f68028006f41a4b1806b496c6ac | |
parent | 8d8eb0d8241bf1314727471ffa3d930f42c20764 (diff) |
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>
(cherry picked from commit 883f91a7c7c534d812c7d5c2a1d340e0dab2b58a)
-rw-r--r-- | subsys/bluetooth/host/gatt.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/subsys/bluetooth/host/gatt.c b/subsys/bluetooth/host/gatt.c index 56c6b1822..92ae2e551 100644 --- a/subsys/bluetooth/host/gatt.c +++ b/subsys/bluetooth/host/gatt.c @@ -712,6 +712,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_addr_le_cmp(&conn->le.dst, ¶ms->_peer)) { + continue; + } + if (handle != params->value_handle) { continue; } |