From 64b9ed2e90024fe831d21a9aceb7d70a1e59b06b Mon Sep 17 00:00:00 2001 From: teach310 Date: Fri, 10 Nov 2023 22:22:46 +0900 Subject: [PATCH] fix RespondToRequest arg to firstRequest --- .../Samples/01_LightControl/SampleLightControl_Peripheral.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/CoreBluetooth/Samples/01_LightControl/SampleLightControl_Peripheral.cs b/Assets/CoreBluetooth/Samples/01_LightControl/SampleLightControl_Peripheral.cs index c152fc9..e277831 100644 --- a/Assets/CoreBluetooth/Samples/01_LightControl/SampleLightControl_Peripheral.cs +++ b/Assets/CoreBluetooth/Samples/01_LightControl/SampleLightControl_Peripheral.cs @@ -85,13 +85,13 @@ void ICBPeripheralManagerDelegate.DidReceiveWriteRequests(CBPeripheralManager pe { if (request.Characteristic.UUID != SampleLightControl_Data.LightControlCharacteristicUUID) { - peripheral.RespondToRequest(request, CBATTError.RequestNotSupported); + peripheral.RespondToRequest(firstRequest, CBATTError.RequestNotSupported); return; } if (request.Value.Length != 7) { - peripheral.RespondToRequest(request, CBATTError.InvalidAttributeValueLength); + peripheral.RespondToRequest(firstRequest, CBATTError.InvalidAttributeValueLength); return; } }