diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2016-09-12 14:41:40 +0300 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2016-09-12 16:28:47 +0300 |
commit | 4ff30e05d41c2aef0038a44187a8f0f53b0547bb (patch) | |
tree | 076041581291f3c7c0e9ab45d5de02037832401d /profiles/gap | |
parent | e087e9693edb72f2cec8144bd5e83080515b8bc8 (diff) | |
download | bluez-4ff30e05d41c2aef0038a44187a8f0f53b0547bb.tar.gz |
gap: Fix not handling accept properly
On accept the profile shall check about existing attribute, etc and once
done call btd_service_connecting_complete updating the service state
properly.
Diffstat (limited to 'profiles/gap')
-rw-r--r-- | profiles/gap/gas.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/profiles/gap/gas.c b/profiles/gap/gas.c index 35b996cd1..b10b6acd9 100644 --- a/profiles/gap/gas.c +++ b/profiles/gap/gas.c @@ -300,6 +300,13 @@ static int gap_driver_accept(struct btd_service *service) bt_uuid16_create(&gap_uuid, GAP_UUID16); gatt_db_foreach_service(db, &gap_uuid, foreach_gap_service, gas); + if (!gas->attr) { + error("GAP attribute not found"); + return -1; + } + + btd_service_connecting_complete(service, 0); + return 0; } |