From c5ef2bad8177e7ae55cd9f79b73865c0b4d88a51 Mon Sep 17 00:00:00 2001 From: chrisdecenzo <61757564+chrisdecenzo@users.noreply.github.com> Date: Wed, 14 Sep 2022 11:05:13 -0700 Subject: [PATCH] Address testing feedback from opcert callbacks, and re-commissioning (#22369) * Draft: address testing feedback from new opcert callbacks * temporary workaround to isolate a memory corruption * add check for existing fabric during commissioning, handle correctly on content app platform * address comments * address comments * address comments * Restyled by clang-format (#22524) Co-authored-by: Restyled.io * address comments Co-authored-by: restyled-io[bot] <32688539+restyled-io[bot]@users.noreply.github.com> Co-authored-by: Restyled.io --- examples/platform/linux/CommissionerMain.h | 2 +- src/controller/CHIPDeviceController.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/platform/linux/CommissionerMain.h b/examples/platform/linux/CommissionerMain.h index e241d436c4e71f..75ddf5debe852e 100644 --- a/examples/platform/linux/CommissionerMain.h +++ b/examples/platform/linux/CommissionerMain.h @@ -34,7 +34,7 @@ using chip::Transport::PeerAddress; CHIP_ERROR CommissionerPairOnNetwork(uint32_t pincode, uint16_t disc, PeerAddress address); CHIP_ERROR CommissionerPairUDC(uint32_t pincode, size_t index); -CHIP_ERROR InitCommissioner(uint16_t commissionerPort, uint16_t udcListenPort, chip::FabricId fabricId = chip::kUndefinedFabricId); +CHIP_ERROR InitCommissioner(uint16_t commissionerPort, uint16_t udcListenPort, chip::FabricId fabricId); void ShutdownCommissioner(); DeviceCommissioner * GetDeviceCommissioner(); diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index 7ac27332ee0f38..5a4c1c5a73097e 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -2061,7 +2061,7 @@ void DeviceCommissioner::PerformCommissioningStep(DeviceProxy * proxy, Commissio app::InteractionModelEngine * engine = app::InteractionModelEngine::GetInstance(); app::ReadPrepareParams readParams(proxy->GetSecureSession().Value()); - // NOTE: this array cannot have more than 9 entries, since the spec mandates that server only needs to support 9 + // NOTE: this array cannot have more than 9 entries, since 9 is what the spec requires as a minimum on servers app::AttributePathParams readPaths[9]; // Read all the feature maps for all the networking clusters on any endpoint to determine what is supported readPaths[0] = app::AttributePathParams(app::Clusters::NetworkCommissioning::Id,