From 2ef55b81d2881caa4fd12e713f944bb9daca9ca6 Mon Sep 17 00:00:00 2001 From: night-crawler Date: Thu, 30 Nov 2023 16:56:10 +0000 Subject: [PATCH] Add service_uuid to the ValueNotification struct --- src/winrtble/peripheral.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/winrtble/peripheral.rs b/src/winrtble/peripheral.rs index 1f11b2f9..c2ba385f 100644 --- a/src/winrtble/peripheral.rs +++ b/src/winrtble/peripheral.rs @@ -497,10 +497,11 @@ impl ApiPeripheral for Peripheral { .ok_or_else(|| Error::NotSupported("Characteristic not found for subscribe".into()))?; let notifications_sender = self.shared.notifications_channel.clone(); let uuid = characteristic.uuid; + let service_uuid = ble_service.uuid; ble_characteristic .subscribe(Box::new(move |value| { let notification = ValueNotification { - service_uuid: ble_service.uuid, + service_uuid, uuid, value, };