@@ -104,28 +104,6 @@ CHIP_ERROR AddResponseOnError(CommandHandlerInterface::HandlerContext & ctx, Res
104
104
return AddResponseOnError (ctx, resp, StatusIB (status).ToChipError ());
105
105
}
106
106
107
- Status SetLastConfiguredBy (HandlerContext & ctx)
108
- {
109
- const Access::SubjectDescriptor descriptor = ctx.mCommandHandler .GetSubjectDescriptor ();
110
-
111
- if (AuthMode::kCase == descriptor.authMode )
112
- {
113
- return Attributes::LastConfiguredBy::Set (ctx.mRequestPath .mEndpointId , descriptor.subject );
114
- }
115
-
116
- return Attributes::LastConfiguredBy::SetNull (ctx.mRequestPath .mEndpointId );
117
- }
118
-
119
- template <typename ResponseType>
120
- CHIP_ERROR UpdateLastConfiguredBy (HandlerContext & ctx, ResponseType resp)
121
- {
122
- Status status = SetLastConfiguredBy (ctx);
123
-
124
- // LastConfiguredBy is optional, so we don't want to fail the command if it fails to update
125
- VerifyOrReturnValue (!(Status::Success == status || Status::UnsupportedAttribute == status), CHIP_NO_ERROR);
126
- return AddResponseOnError (ctx, resp, status);
127
- }
128
-
129
107
// / @brief Helper function to update the FabricSceneInfo attribute for a given Endpoint and fabric
130
108
// / @param endpoint Endpoint to update
131
109
// / @param fabric Fabric to update
@@ -471,8 +449,6 @@ void AddSceneParse(CommandHandlerInterface::HandlerContext & ctx, const CommandD
471
449
UpdateFabricSceneInfo (ctx.mRequestPath .mEndpointId , ctx.mCommandHandler .GetAccessingFabricIndex (),
472
450
Optional<GroupId>(), Optional<SceneId>(), Optional<bool >())));
473
451
474
- ReturnOnFailure (UpdateLastConfiguredBy (ctx, response));
475
-
476
452
// Write response
477
453
response.status = to_underlying (Protocols::InteractionModel::Status::Success);
478
454
ctx.mCommandHandler .AddResponse (ctx.mRequestPath , response);
@@ -521,7 +497,7 @@ void ViewSceneParse(HandlerContext & ctx, const CommandData & req, GroupDataProv
521
497
SceneStorageId (req.sceneID , req.groupID ), scene)));
522
498
523
499
// Response Extension Field Sets buffer
524
- Structs::ExtensionFieldSet ::Type responseEFSBuffer[scenes::kMaxClustersPerScene ];
500
+ Structs::ExtensionFieldSetStruct ::Type responseEFSBuffer[scenes::kMaxClustersPerScene ];
525
501
uint8_t deserializedEFSCount = 0 ;
526
502
527
503
// Adds extension field sets to the scene
@@ -550,8 +526,8 @@ void ViewSceneParse(HandlerContext & ctx, const CommandData & req, GroupDataProv
550
526
response.transitionTime .SetValue (scene.mStorageData .mSceneTransitionTimeMs );
551
527
552
528
response.sceneName .SetValue (CharSpan (scene.mStorageData .mName , scene.mStorageData .mNameLength ));
553
- Span<Structs::ExtensionFieldSet ::Type> responseEFSSpan (responseEFSBuffer, deserializedEFSCount);
554
- response.extensionFieldSets .SetValue (responseEFSSpan);
529
+ Span<Structs::ExtensionFieldSetStruct ::Type> responseEFSSpan (responseEFSBuffer, deserializedEFSCount);
530
+ response.extensionFieldSetStructs .SetValue (responseEFSSpan);
555
531
556
532
ctx.mCommandHandler .AddResponse (ctx.mRequestPath , response);
557
533
}
@@ -888,7 +864,6 @@ void ScenesServer::HandleRemoveScene(HandlerContext & ctx, const Commands::Remov
888
864
sceneValid.Emplace (false );
889
865
}
890
866
891
- ReturnOnFailure (UpdateLastConfiguredBy (ctx, response));
892
867
ReturnOnFailure (
893
868
AddResponseOnError (ctx, response,
894
869
UpdateFabricSceneInfo (ctx.mRequestPath .mEndpointId , ctx.mCommandHandler .GetAccessingFabricIndex (),
@@ -942,8 +917,6 @@ void ScenesServer::HandleRemoveAllScenes(HandlerContext & ctx, const Commands::R
942
917
UpdateFabricSceneInfo (ctx.mRequestPath .mEndpointId , ctx.mCommandHandler .GetAccessingFabricIndex (),
943
918
Optional<GroupId>(), Optional<SceneId>(), sceneValid)));
944
919
945
- ReturnOnFailure (UpdateLastConfiguredBy (ctx, response));
946
-
947
920
// Write response
948
921
response.status = to_underlying (Protocols::InteractionModel::Status::Success);
949
922
ctx.mCommandHandler .AddResponse (ctx.mRequestPath , response);
@@ -970,8 +943,6 @@ void ScenesServer::HandleStoreScene(HandlerContext & ctx, const Commands::StoreS
970
943
req.sceneID , mGroupProvider );
971
944
972
945
ReturnOnFailure (AddResponseOnError (ctx, response, err));
973
-
974
- ReturnOnFailure (UpdateLastConfiguredBy (ctx, response));
975
946
response.status = to_underlying (Protocols::InteractionModel::Status::Success);
976
947
ctx.mCommandHandler .AddResponse (ctx.mRequestPath , response);
977
948
}
@@ -1135,8 +1106,6 @@ void ScenesServer::HandleCopyScene(HandlerContext & ctx, const Commands::CopySce
1135
1106
Optional<GroupId>(), Optional<SceneId>(), Optional<bool >() /* = sceneValid*/ )));
1136
1107
}
1137
1108
1138
- ReturnOnFailure (UpdateLastConfiguredBy (ctx, response));
1139
-
1140
1109
response.status = to_underlying (Protocols::InteractionModel::Status::Success);
1141
1110
ctx.mCommandHandler .AddResponse (ctx.mRequestPath , response);
1142
1111
return ;
@@ -1157,8 +1126,6 @@ void ScenesServer::HandleCopyScene(HandlerContext & ctx, const Commands::CopySce
1157
1126
UpdateFabricSceneInfo (ctx.mRequestPath .mEndpointId , ctx.mCommandHandler .GetAccessingFabricIndex (),
1158
1127
Optional<GroupId>(), Optional<SceneId>(), Optional<bool >())));
1159
1128
1160
- ReturnOnFailure (UpdateLastConfiguredBy (ctx, response));
1161
-
1162
1129
response.status = to_underlying (Protocols::InteractionModel::Status::Success);
1163
1130
ctx.mCommandHandler .AddResponse (ctx.mRequestPath , response);
1164
1131
}
@@ -1174,12 +1141,6 @@ using namespace chip::app::Clusters::ScenesManagement;
1174
1141
1175
1142
void emberAfScenesManagementClusterServerInitCallback (EndpointId endpoint)
1176
1143
{
1177
- Status status = Attributes::LastConfiguredBy::SetNull (endpoint);
1178
- if (Status::Success != status)
1179
- {
1180
- ChipLogDetail (Zcl, " ERR: setting LastConfiguredBy on Endpoint %hu Status: %x" , endpoint, to_underlying (status));
1181
- }
1182
-
1183
1144
// Initialize the FabricSceneInfo by getting the number of scenes and the remaining capacity for storing fabric scene data
1184
1145
for (auto & info : chip::Server::GetInstance ().GetFabricTable ())
1185
1146
{
0 commit comments