Skip to content

Commit

Permalink
[ESP32] Set credential type and index to passed-in credentials (#25187)
Browse files Browse the repository at this point in the history
* [ESP32] Set credential type and index to passed-in credentials

* Undo use of memcpy to copy credentials
  • Loading branch information
jadhavrohit924 authored Feb 24, 2023
1 parent a992882 commit 61cf6f2
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions examples/platform/esp32/lock/BoltLockManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<const CredentialStruct>(mCredentials[userIndex], totalCredentials);

// Save user information in NVM flash
Expand Down

0 comments on commit 61cf6f2

Please sign in to comment.