From 2fd36bcc2b37a8d78a1d98e82a4ead52acc3af23 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Tue, 16 Nov 2021 03:06:16 -0500 Subject: [PATCH] Fix BLE commissioning. (#11805) While fixing network commissioning I broke BLE. Sorry. Underlying issue - BLE and IP commissioning both do network adds incorrectly. BLE uses the PASE connection and handles the network add in chip-tool. IP uses the CASE connection after commissioning. Neither are fully spec compliant, but we need to merge the BLE and IP commissioning flows to get chip-tool to work in a spec-compliant way in both cases. --- src/controller/CHIPDeviceController.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index 138af750d4aa49..8c66429cb1799d 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -938,7 +938,7 @@ void DeviceCommissioner::RendezvousCleanup(CHIP_ERROR status) { FreeRendezvousSession(); - if (mDeviceBeingCommissioned != nullptr) + if (mDeviceBeingCommissioned != nullptr && mIsIPRendezvous) { // Release the commissionee device. For BLE, this is stored, // for IP commissioning, we have taken a reference to the