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.
diff --git a/profiles/gap/gas.c b/profiles/gap/gas.c
index 35b996c..b10b6ac 100644
--- a/profiles/gap/gas.c
+++ b/profiles/gap/gas.c
@@ -300,6 +300,13 @@
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;
}