From 469ebe6c70f05199301055316fe4a7bb683b3882 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Wed, 16 Mar 2016 13:39:03 +0200 Subject: [PATCH] shared/gatt-client: Simplify service changed handling Don't reset the range since the discovery should be able to detect modifications and in case the service was removed the code calls gatt_db_clear_range to reset it at the end. --- src/shared/gatt-client.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/shared/gatt-client.c b/src/shared/gatt-client.c index 37c219b3c..1dd6b22e3 100644 --- a/src/shared/gatt-client.c +++ b/src/shared/gatt-client.c @@ -1377,16 +1377,6 @@ static void process_service_changed(struct bt_gatt_client *client, { struct discovery_op *op; - /* On full database reset just re-run attribute discovery */ - if (start_handle == 0x0001 && end_handle == 0xffff) - goto discover; - - /* Remove all services that overlap the modified range since we'll - * rediscover them - */ - gatt_db_clear_range(client->db, start_handle, end_handle); - -discover: op = discovery_op_create(client, start_handle, end_handle, service_changed_complete, service_changed_failure); -- 2.47.3