Skip to content

Commit

Permalink
Update src/app/clusters/descriptor/descriptor.cpp
Browse files Browse the repository at this point in the history
Co-authored-by: Tennessee Carmel-Veilleux <tennessee.carmelveilleux@gmail.com>
  • Loading branch information
andy31415 and tcarmelveilleux authored Jan 20, 2025
1 parent 28a8640 commit 63dc63f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app/clusters/descriptor/descriptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,11 @@ CHIP_ERROR DescriptorAttrAccess::ReadDeviceAttribute(EndpointId endpoint, Attrib
DataModel::ListBuilder<DataModel::DeviceTypeEntry> deviceTypesList;
ReturnErrorOnFailure(InteractionModelEngine::GetInstance()->GetDataModelProvider()->DeviceTypes(endpoint, deviceTypesList));

auto span = builder.TakeBuffer();
auto deviceTypes = builder.TakeBuffer();

CHIP_ERROR err = aEncoder.EncodeList([&span](const auto & encoder) -> CHIP_ERROR {
CHIP_ERROR err = aEncoder.EncodeList([&deviceTypes](const auto & encoder) -> CHIP_ERROR {
Descriptor::Structs::DeviceTypeStruct::Type deviceStruct;
for (auto & type : span)
for (const auto & type : deviceTypes)
{
deviceStruct.deviceType = type.deviceTypeId;
deviceStruct.revision = type.deviceTypeRevision;
Expand Down

0 comments on commit 63dc63f

Please sign in to comment.