Skip to content

Commit

Permalink
fixup! update xml
Browse files Browse the repository at this point in the history
  • Loading branch information
mkardous-silabs committed Jul 19, 2023
1 parent fca074a commit fed4c3f
Show file tree
Hide file tree
Showing 4 changed files with 261 additions and 265 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ bool emberAfIcdManagementClusterUnregisterClientCallback(chip::app::CommandHandl
{
PersistentStorageDelegate & storage = chip::Server::GetInstance().GetPersistentStorage();
FabricIndex fabric = commandObj->GetAccessingFabricIndex();
status = IcdManagementServer::GetInstance().UnregisterClient(storage, fabric, commandData.checkInNodeID, commandData.key,
status = IcdManagementServer::GetInstance().UnregisterClient(storage, fabric, commandData.checkInNodeID, commandData.verificationKey,
is_admin);
}

Expand Down
6 changes: 3 additions & 3 deletions src/app/icd/IcdManagementServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Status IcdManagementServer::RegisterClient(PersistentStorageDelegate & storage,
}

Status IcdManagementServer::UnregisterClient(PersistentStorageDelegate & storage, FabricIndex fabric_index, chip::NodeId node_id,
Optional<chip::ByteSpan> key, bool is_admin)
Optional<chip::ByteSpan> verificationKey, bool is_admin)
{
IcdMonitoringTable table(storage, fabric_index, GetClientsSupportedPerFabric());

Expand All @@ -62,8 +62,8 @@ Status IcdManagementServer::UnregisterClient(PersistentStorageDelegate & storage
// Existing entry: Validate Key if, and only if, the ISD has NOT administrator permissions
if (!is_admin)
{
VerifyOrReturnError(key.HasValue(), InteractionModel::Status::Failure);
VerifyOrReturnError(key.Value().data_equal(entry.key), InteractionModel::Status::Failure);
VerifyOrReturnError(verificationKey.HasValue(), InteractionModel::Status::Failure);
VerifyOrReturnError(verificationKey.Value().data_equal(entry.key), InteractionModel::Status::Failure);
}

err = table.Remove(entry.index);
Expand Down
2 changes: 1 addition & 1 deletion src/app/icd/IcdManagementServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class IcdManagementServer
uint64_t monitored_subject, chip::ByteSpan key, Optional<chip::ByteSpan> verification_key, bool is_admin);

Status UnregisterClient(PersistentStorageDelegate & storage, FabricIndex fabric_index, chip::NodeId node_id,
Optional<chip::ByteSpan> key, bool is_admin);
Optional<chip::ByteSpan> verificationKey, bool is_admin);

Status StayActiveRequest(FabricIndex fabric_index);

Expand Down
Loading

0 comments on commit fed4c3f

Please sign in to comment.