From c8935489a0e5100c9ade3984799107dca2e6cfa4 Mon Sep 17 00:00:00 2001 From: Tennessee Carmel-Veilleux Date: Thu, 7 Jul 2022 21:55:35 -0400 Subject: [PATCH] Removed leftover debug --- .../operational-credentials-server.cpp | 24 +++++-------------- 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp index f93b95f340fd41..2f051aa70fc644 100644 --- a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp +++ b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp @@ -607,7 +607,6 @@ bool emberAfOperationalCredentialsClusterAddNOCCallback(app::CommandHandler * co auto nocResponse = OperationalCertStatus::kSuccess; auto nonDefaultStatus = Status::Success; bool needRevert = false; - int line = 0; CHIP_ERROR err = CHIP_NO_ERROR; FabricIndex newFabricIndex = kUndefinedFabricIndex; @@ -626,22 +625,11 @@ bool emberAfOperationalCredentialsClusterAddNOCCallback(app::CommandHandler * co ChipLogProgress(Zcl, "OpCreds: Received an AddNOC command"); - VerifyOrExit(NOCValue.size() <= Credentials::kMaxCHIPCertLength, { - nonDefaultStatus = Status::InvalidCommand; - line = __LINE__; - }); - VerifyOrExit(!ICACValue.HasValue() || ICACValue.Value().size() <= Credentials::kMaxCHIPCertLength, { - nonDefaultStatus = Status::InvalidCommand; - line = __LINE__; - }); - VerifyOrExit(ipkValue.size() == Crypto::CHIP_CRYPTO_SYMMETRIC_KEY_LENGTH_BYTES, { - nonDefaultStatus = Status::InvalidCommand; - line = __LINE__; - }); - VerifyOrExit(IsVendorIdValidOperationally(adminVendorId), { - nonDefaultStatus = Status::InvalidCommand; - line = __LINE__; - }); + VerifyOrExit(NOCValue.size() <= Credentials::kMaxCHIPCertLength, nonDefaultStatus = Status::InvalidCommand); + VerifyOrExit(!ICACValue.HasValue() || ICACValue.Value().size() <= Credentials::kMaxCHIPCertLength, + nonDefaultStatus = Status::InvalidCommand); + VerifyOrExit(ipkValue.size() == Crypto::CHIP_CRYPTO_SYMMETRIC_KEY_LENGTH_BYTES, nonDefaultStatus = Status::InvalidCommand); + VerifyOrExit(IsVendorIdValidOperationally(adminVendorId), nonDefaultStatus = Status::InvalidCommand); VerifyOrExit(failSafeContext.IsFailSafeArmed(commandObj->GetAccessingFabricIndex()), nonDefaultStatus = Status::FailsafeRequired); @@ -778,7 +766,7 @@ bool emberAfOperationalCredentialsClusterAddNOCCallback(app::CommandHandler * co else { commandObj->AddStatus(commandPath, nonDefaultStatus); - ChipLogError(Zcl, "OpCreds: Failed AddNOC request with IM error 0x%02x, line %d", to_underlying(nonDefaultStatus), line); + ChipLogError(Zcl, "OpCreds: Failed AddNOC request with IM error 0x%02x", to_underlying(nonDefaultStatus)); } return true;