From 1979040409571077e244f6e2f7d4ed984d0db6f7 Mon Sep 17 00:00:00 2001 From: Rohit Jadhav <69809379+jadhavrohit924@users.noreply.github.com> Date: Fri, 24 Feb 2023 11:46:29 +0530 Subject: [PATCH] [ESP32] Set credential type and index to passed-in credentials (#25187) * [ESP32] Set credential type and index to passed-in credentials * Undo use of memcpy to copy credentials --- examples/platform/esp32/lock/BoltLockManager.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/examples/platform/esp32/lock/BoltLockManager.cpp b/examples/platform/esp32/lock/BoltLockManager.cpp index 5c4b3225f92d8e..dd9b1df2ac08b0 100644 --- a/examples/platform/esp32/lock/BoltLockManager.cpp +++ b/examples/platform/esp32/lock/BoltLockManager.cpp @@ -431,13 +431,7 @@ bool BoltLockManager::SetUser(chip::EndpointId endpointId, uint16_t userIndex, c for (size_t i = 0; i < totalCredentials; ++i) { mCredentials[userIndex][i] = credentials[i]; - // TODO: Why are we modifying the passed-in credentials? - // https://github.com/project-chip/connectedhomeip/issues/25083 - // For now, preserve pre-existing behavior, which set credentialType to 1. - mCredentials[userIndex][i].credentialType = CredentialTypeEnum::kPin; - mCredentials[userIndex][i].credentialIndex = i + 1; } - userInStorage.credentials = chip::Span(mCredentials[userIndex], totalCredentials); // Save user information in NVM flash