Diff between 8d1e036ba0588649c19c2c9c1666628139d7a627 and 82a210f6593405040f5bce8f5a9a03addf39d364

Changed Files

File Additions Deletions Status
src/device.c +8 -0 modified
src/device.h +1 -0 modified

Full Patch

diff --git a/src/device.c b/src/device.c
index bf06e9d..002dbea 100644
--- a/src/device.c
+++ b/src/device.c
@@ -5095,6 +5095,14 @@ struct bt_gatt_client *btd_device_get_gatt_client(struct btd_device *device)
 	return device->client;
 }
 
+struct bt_gatt_server *btd_device_get_gatt_server(struct btd_device *device)
+{
+	if (!device)
+		return NULL;
+
+	return device->server;
+}
+
 void btd_device_gatt_set_service_changed(struct btd_device *device,
 						uint16_t start, uint16_t end)
 {
diff --git a/src/device.h b/src/device.h
index a7fefee..8edd0df 100644
--- a/src/device.h
+++ b/src/device.h
@@ -69,6 +69,7 @@ struct gatt_primary *btd_device_get_primary(struct btd_device *device,
 GSList *btd_device_get_primaries(struct btd_device *device);
 struct gatt_db *btd_device_get_gatt_db(struct btd_device *device);
 struct bt_gatt_client *btd_device_get_gatt_client(struct btd_device *device);
+struct bt_gatt_server *btd_device_get_gatt_server(struct btd_device *device);
 void btd_device_gatt_set_service_changed(struct btd_device *device,
 						uint16_t start, uint16_t end);
 bool device_attach_att(struct btd_device *dev, GIOChannel *io);