Skip to content

Commit

Permalink
fixing clang-tidy error
Browse files Browse the repository at this point in the history
  • Loading branch information
Alami-Amine committed Dec 20, 2024
1 parent 264ba3e commit 4e5c6e7
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/protocols/secure_channel/CASESession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1138,19 +1138,15 @@ CASESession::NextStep CASESession::HandleSigma1(System::PacketBufferHandle && ms

return NextStep::Create<Step>(Step::kSendSigma2);
}
else
{
ChipLogError(SecureChannel, "CASE failed to match destination ID with local fabrics");
ChipLogByteSpan(SecureChannel, parsedSigma1.destinationId);

// FindLocalNodeFromDestinationId returns CHIP_ERROR_KEY_NOT_FOUND if Sigma1's DestinationId does not match any
// candidateDestinationId, this will trigger a status Report with ProtocolCode = NoSharedTrustRoots.
ChipLogError(SecureChannel, "CASE failed to match destination ID with local fabrics");
ChipLogByteSpan(SecureChannel, parsedSigma1.destinationId);

// Returning a CHIP_ERROR variant that will trigger a corresponding Status Report.
return NextStep::Create<CHIP_ERROR>(err);
}
// FindLocalNodeFromDestinationId returns CHIP_ERROR_KEY_NOT_FOUND if Sigma1's DestinationId does not match any
// candidateDestinationId, this will trigger a status Report with ProtocolCode = NoSharedTrustRoots.

return NextStep::Create<CHIP_ERROR>(CHIP_NO_ERROR);
// Returning a CHIP_ERROR variant that will trigger a corresponding Status Report.
return NextStep::Create<CHIP_ERROR>(err);
}

CHIP_ERROR CASESession::PrepareSigma2Resume(EncodeSigma2ResumeInputs & outSigma2ResData)
Expand Down

0 comments on commit 4e5c6e7

Please sign in to comment.