From 55e1678bd839b623996be4dfc2957f3b49244464 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Mon, 5 Jan 2015 15:36:36 -0200 Subject: [PATCH] shared/gatt-db: Fix duplicate service notification This make sure the callback are only called when a service really changes. --- src/shared/gatt-db.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/shared/gatt-db.c b/src/shared/gatt-db.c index d2cdacc14..74c3e709b 100644 --- a/src/shared/gatt-db.c +++ b/src/shared/gatt-db.c @@ -767,6 +767,10 @@ bool gatt_db_service_set_active(struct gatt_db_attribute *attrib, bool active) return false; service = attrib->service; + + if (service->active == active) + return true; + service->active = active; notify_service_changed(service->db, service, active); -- 2.47.3