summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2018-03-27 18:38:20 +0300
committerSzymon Janc <szymon.janc@codecoup.pl>2018-03-28 08:43:21 +0200
commitc79ad882a6e0563917b2687fb73520ae089c75a6 (patch)
treed46877c70cc6088214a0b72a4133aef00ef70fdb /src
parent382ad0905d2c238e9911bc491cb1a9cc9eec671e (diff)
downloadbluez-c79ad882a6e0563917b2687fb73520ae089c75a6.tar.gz
gatt: Fix checking for paired flag instead of bonded
Device state should remain valid for devices that are bonded/stored not only paired.
Diffstat (limited to 'src')
-rw-r--r--src/gatt-database.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gatt-database.c b/src/gatt-database.c
index 2c2526f74..5e2390b34 100644
--- a/src/gatt-database.c
+++ b/src/gatt-database.c
@@ -324,7 +324,7 @@ static void att_disconnected(int err, void *user_data)
if (!device)
goto remove;
- if (device_is_paired(device, state->bdaddr_type))
+ if (device_is_bonded(device, state->bdaddr_type))
return;
remove:
@@ -1125,7 +1125,7 @@ static void send_notification_to_device(void *data, void *user_data)
server = btd_device_get_gatt_server(device);
if (!server) {
- if (!device_is_paired(device, device_state->bdaddr_type))
+ if (!device_is_bonded(device, device_state->bdaddr_type))
goto remove;
state_set_pending(device_state, notify);
return;