If discovery was aborted (i.e due to a disconnect) check if pending
services were active so only staled services which were not completed
fetched are removed.
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
struct gatt_db_attribute *attr = svc->data;
uint16_t start, end;
+ /* Leave active services if operation was aborted */
+ if ((!success && err == 0) && gatt_db_service_get_active(attr))
+ continue;
+
gatt_db_attribute_get_service_data(attr, &start, &end,
NULL, NULL);