When handling multiple service changed multiple discovery operations
would be performed but at the end of each one the hash would be read
which not only would create extra traffic but also prevents the code
to properly detection services disappering.
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
struct bt_gatt_client *client = op->client;
bt_uuid_t uuid;
- /* Check if hash was already read */
- if (op->hash)
+ /* Check if hash was already been read or there are more services to
+ * process.
+ */
+ if (op->hash || !queue_isempty(client->svc_chngd_queue))
return false;
bt_uuid16_create(&uuid, GATT_CHARAC_DB_HASH);