Diff between ab1dbca212d64943dfca2af7ad543ea116d30e4c and f476e9d6cfe9a7d97d31e831725004195a12773b

Changed Files

File Additions Deletions Status
src/shared/gatt-db.c +8 -0 modified
src/shared/gatt-db.h +1 -0 modified

Full Patch

diff --git a/src/shared/gatt-db.c b/src/shared/gatt-db.c
index bb60904..d2cdacc 100644
--- a/src/shared/gatt-db.c
+++ b/src/shared/gatt-db.c
@@ -774,6 +774,14 @@ bool gatt_db_service_set_active(struct gatt_db_attribute *attrib, bool active)
 	return true;
 }
 
+bool gatt_db_service_get_active(struct gatt_db_attribute *attrib)
+{
+	if (!attrib)
+		return false;
+
+	return attrib->service->active;
+}
+
 void gatt_db_read_by_group_type(struct gatt_db *db, uint16_t start_handle,
 							uint16_t end_handle,
 							const bt_uuid_t type,
diff --git a/src/shared/gatt-db.h b/src/shared/gatt-db.h
index e5fe6bb..f188944 100644
--- a/src/shared/gatt-db.h
+++ b/src/shared/gatt-db.h
@@ -81,6 +81,7 @@ gatt_db_service_add_included(struct gatt_db_attribute *attrib,
 					struct gatt_db_attribute *include);
 
 bool gatt_db_service_set_active(struct gatt_db_attribute *attrib, bool active);
+bool gatt_db_service_get_active(struct gatt_db_attribute *attrib);
 
 void gatt_db_read_by_group_type(struct gatt_db *db, uint16_t start_handle,
 							uint16_t end_handle,