From ffef3e9c3833dea8a3091caea77159d803fb5ab8 Mon Sep 17 00:00:00 2001 From: Song GUO Date: Tue, 12 Dec 2023 11:04:57 +0800 Subject: [PATCH] [icd] integrate ICD management command into CHIP tool (#30863) * [icd] integrate ICD management command into CHIP tool * Delete entry on failure * Fix build --- examples/chip-tool/commands/common/CHIPCommand.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/chip-tool/commands/common/CHIPCommand.cpp b/examples/chip-tool/commands/common/CHIPCommand.cpp index 084e0b357ec166..d076dd82de40fb 100644 --- a/examples/chip-tool/commands/common/CHIPCommand.cpp +++ b/examples/chip-tool/commands/common/CHIPCommand.cpp @@ -116,6 +116,12 @@ CHIP_ERROR CHIPCommand::MaybeSetUpStack() // TODO: Implement persistent ICD storage for the chip-tool. ReturnLogErrorOnFailure(sICDClientStorage.Init(&mDefaultStorage, &sSessionKeystore)); + // chip-tool uses a non-persistent keystore. + // ICD storage lifetime is currently tied to the chip-tool's lifetime. Since chip-tool interactive mode is currently used for + // ICD commissioning and check-in validation, this temporary storage meets the test requirements. + // TODO: Implement persistent ICD storage for the chip-tool. + ReturnLogErrorOnFailure(sICDClientStorage.Init(&mDefaultStorage, &sSessionKeystore)); + chip::Controller::FactoryInitParams factoryInitParams; factoryInitParams.fabricIndependentStorage = &mDefaultStorage;