Skip to content

Commit

Permalink
Fix error on write request with incorrect timed request flag
Browse files Browse the repository at this point in the history
Please see
#33952 (comment)

This was changed in the spec, but not in the SDK or unit tests.

The unit test here covers this, but we should consider adding it to
the cert testing as well. Please see
CHIP-Specifications/chip-test-plans#4256
  • Loading branch information
cecille committed Jul 3, 2024
1 parent b7cb229 commit 28a7543
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/app/WriteHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -587,8 +587,8 @@ Status WriteHandler::ProcessWriteRequest(System::PacketBufferHandle && aPayload,
if (mIsTimedRequest != aIsTimedWrite)
{
// The message thinks it should be part of a timed interaction but it's
// not, or vice versa. Spec says to Respond with UNSUPPORTED_ACCESS.
status = Status::UnsupportedAccess;
// not, or vice versa.
status = Status::TimedRequestMismatch;
goto exit;
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/tests/TestWriteInteraction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ TEST_F(TestWriteInteraction, TestWriteHandler)
}
else
{
EXPECT_EQ(status, Status::UnsupportedAccess);
EXPECT_EQ(status, Status::TimedRequestMismatch);
}

mpTestContext->DrainAndServiceIO();
Expand Down

0 comments on commit 28a7543

Please sign in to comment.