Skip to content

Commit

Permalink
project-chip#26925 add error log if fabricIdx or nodeId is missing on…
Browse files Browse the repository at this point in the history
… remote actions
  • Loading branch information
mmarc committed Jul 21, 2023
1 parent 8577934 commit 7b90c3f
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/app/clusters/door-lock-server/door-lock-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,21 @@ bool DoorLockServer::SetLockState(chip::EndpointId endpointId, DlLockState newLo
opType = LockOperationTypeEnum::kUnlatch;
}

SendLockOperationEvent(endpointId, opType, opSource, OperationErrorEnum::kUnspecified, userIndex, fabricIdx, nodeId,
credentials, success);
if (OperationSourceEnum::kRemote == opSource)
{
if (fabricIdx.IsNull() || nodeId.IsNull())
{
ChipLogError(Zcl, "Received SetLockState for remote operation without fabricIdx or nodeId");
}

SendLockOperationEvent(endpointId, opType, opSource, OperationErrorEnum::kUnspecified, userIndex, fabricIdx, nodeId,
credentials, success);
}
else
{
SendLockOperationEvent(endpointId, opType, opSource, OperationErrorEnum::kUnspecified, userIndex, NullNullable,
NullNullable, credentials, success);
}

// Reset wrong entry attempts (in case there were any incorrect credentials presented before) if lock/unlock was a success
// and a valid credential was presented.
Expand Down

0 comments on commit 7b90c3f

Please sign in to comment.