diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2015-10-22 10:46:44 +0300 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2015-10-22 11:18:39 +0300 |
commit | 1daaca3d4193e6f32bcd11a6e396149d9fe574f8 (patch) | |
tree | c31c443c48cd5451b7999279ca8c05536901421f /profiles/gap | |
parent | cbce7693487a3352a91929e0014333cc7baa8dc2 (diff) | |
download | bluez-1daaca3d4193e6f32bcd11a6e396149d9fe574f8.tar.gz |
gap/gas: Remove code handling service added/removed
The will take care of calling probe/remove when a matching service is
added removed.
Diffstat (limited to 'profiles/gap')
-rw-r--r-- | profiles/gap/gas.c | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/profiles/gap/gas.c b/profiles/gap/gas.c index 819a9672f..cf91a10a5 100644 --- a/profiles/gap/gas.c +++ b/profiles/gap/gas.c @@ -269,43 +269,6 @@ static void foreach_gap_service(struct gatt_db_attribute *attr, void *user_data) handle_gap_service(gas); } -static void service_added(struct gatt_db_attribute *attr, void *user_data) -{ - struct gas *gas = user_data; - bt_uuid_t uuid, gap_uuid; - - if (!bt_gatt_client_is_ready(gas->client)) - return; - - gatt_db_attribute_get_service_uuid(attr, &uuid); - bt_uuid16_create(&gap_uuid, GAP_UUID16); - - if (bt_uuid_cmp(&uuid, &gap_uuid)) - return; - - if (gas->attr) { - error("More than one GAP service added to device"); - return; - } - - DBG("GAP service added"); - - gas->attr = attr; - handle_gap_service(gas); -} - -static void service_removed(struct gatt_db_attribute *attr, void *user_data) -{ - struct gas *gas = user_data; - - if (gas->attr != attr) - return; - - DBG("GAP service removed"); - - gas->attr = NULL; -} - static int gap_driver_accept(struct btd_service *service) { struct btd_device *device = btd_service_get_device(service); @@ -335,8 +298,6 @@ static int gap_driver_accept(struct btd_service *service) gas->db = gatt_db_ref(db); gas->client = bt_gatt_client_ref(client); - gas->db_id = gatt_db_register(db, service_added, service_removed, gas, - NULL); /* Handle the GAP services */ bt_uuid16_create(&gap_uuid, GAP_UUID16); |