Skip to content

Commit

Permalink
Unsupported Attribute in UpdateLastConfiguredBy no longer causes comm…
Browse files Browse the repository at this point in the history
…ands to fail
  • Loading branch information
lpbeliveau-silabs committed Nov 8, 2023
1 parent 2d62ad1 commit 9b1035d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/app/clusters/scenes-server/scenes-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,19 @@ template <typename ResponseType>
CHIP_ERROR UpdateLastConfiguredBy(HandlerContext & ctx, ResponseType resp)
{
Access::SubjectDescriptor descriptor = ctx.mCommandHandler.GetSubjectDescriptor();
EmberAfStatus status = EMBER_ZCL_STATUS_SUCCESS;

if (AuthMode::kCase == descriptor.authMode)
{
ReturnErrorOnFailure(
AddResponseOnError(ctx, resp, Attributes::LastConfiguredBy::Set(ctx.mRequestPath.mEndpointId, descriptor.subject)));
status = Attributes::LastConfiguredBy::Set(ctx.mRequestPath.mEndpointId, descriptor.subject);
}
else
{
ReturnErrorOnFailure(AddResponseOnError(ctx, resp, Attributes::LastConfiguredBy::SetNull(ctx.mRequestPath.mEndpointId)));
status = Attributes::LastConfiguredBy::SetNull(ctx.mRequestPath.mEndpointId);
}

return CHIP_NO_ERROR;
VerifyOrReturnValue((EMBER_ZCL_STATUS_SUCCESS == status || EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE == status), CHIP_NO_ERROR);
return AddResponseOnError(ctx, resp, status);
}

ScenesServer ScenesServer::mInstance;
Expand Down

0 comments on commit 9b1035d

Please sign in to comment.