Skip to content

Commit

Permalink
Drop impossible non-atomic attribute status after rollback
Browse files Browse the repository at this point in the history
  • Loading branch information
hasty committed Aug 22, 2024
1 parent 78c0f22 commit 0c395c1
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/app/clusters/thermostat-server/thermostat-server-atomic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -588,17 +588,7 @@ void ThermostatAttrAccess::RollbackAtomicWrite(CommandHandler * commandObj, cons

for (size_t i = 0; i < attributeStatuses.AllocatedSize(); ++i)
{
auto & attributeStatus = attributeStatuses[i];
switch (attributeStatus.attributeID)
{
case Presets::Id:
case Schedules::Id:
attributeStatus.statusCode = to_underlying(Status::Success);
break;
default:
commandObj->AddStatus(commandPath, Status::InvalidInState);
return;
}
attributeStatuses[i].statusCode = to_underlying(Status::Success);
}

SendAtomicResponse(commandObj, commandPath, status, attributeStatuses);
Expand Down

0 comments on commit 0c395c1

Please sign in to comment.