diff --git a/src/messaging/ExchangeContext.h b/src/messaging/ExchangeContext.h index 4b5ea21fb170ec..fe120a8a854be4 100644 --- a/src/messaging/ExchangeContext.h +++ b/src/messaging/ExchangeContext.h @@ -238,7 +238,7 @@ class DLL_EXPORT ExchangeContext : public ReliableMessageContext, * If the call is not done, we will rely on information within the exchange context. * * @param shouldPeerBeActive true if the peer should be active, false if we don't know or it should not be - */ + */ void SetShouldPeerBeActive(bool shouldPeerBeActive) { mFlags.Set(Flags::kPeerShouldBeActive, shouldPeerBeActive); } /** diff --git a/src/messaging/tests/TestReliableMessageProtocol.cpp b/src/messaging/tests/TestReliableMessageProtocol.cpp index a49ddb255f4580..0877b01bebffea 100644 --- a/src/messaging/tests/TestReliableMessageProtocol.cpp +++ b/src/messaging/tests/TestReliableMessageProtocol.cpp @@ -322,7 +322,6 @@ class TestReliableMessageProtocol static int InitializeTestCase(void * inContext); }; - void TestReliableMessageProtocol::CheckAddClearRetrans(nlTestSuite * inSuite, void * inContext) { TestContext & ctx = *reinterpret_cast(inContext); @@ -1856,25 +1855,33 @@ int TestReliableMessageProtocol::InitializeTestCase(void * inContext) const nlTest sTests[] = { NL_TEST_DEF("Test ReliableMessageMgr::CheckAddClearRetrans", TestReliableMessageProtocol::CheckAddClearRetrans), - NL_TEST_DEF("Test ReliableMessageMgr::CheckResendApplicationMessage", TestReliableMessageProtocol::CheckResendApplicationMessage), + NL_TEST_DEF("Test ReliableMessageMgr::CheckResendApplicationMessage", + TestReliableMessageProtocol::CheckResendApplicationMessage), NL_TEST_DEF("Test ReliableMessageMgr::CheckCloseExchangeAndResendApplicationMessage", TestReliableMessageProtocol::CheckCloseExchangeAndResendApplicationMessage), - NL_TEST_DEF("Test ReliableMessageMgr::CheckFailedMessageRetainOnSend",TestReliableMessageProtocol::CheckFailedMessageRetainOnSend), + NL_TEST_DEF("Test ReliableMessageMgr::CheckFailedMessageRetainOnSend", + TestReliableMessageProtocol::CheckFailedMessageRetainOnSend), NL_TEST_DEF("Test ReliableMessageMgr::CheckResendApplicationMessageWithPeerExchange", TestReliableMessageProtocol::CheckResendApplicationMessageWithPeerExchange), NL_TEST_DEF("Test ReliableMessageMgr::CheckResendSessionEstablishmentMessageWithPeerExchange", TestReliableMessageProtocol::CheckResendSessionEstablishmentMessageWithPeerExchange), NL_TEST_DEF("Test ReliableMessageMgr::CheckDuplicateMessage", TestReliableMessageProtocol::CheckDuplicateMessage), - NL_TEST_DEF("Test ReliableMessageMgr::CheckDuplicateMessageClosedExchange", TestReliableMessageProtocol::CheckDuplicateMessageClosedExchange), - NL_TEST_DEF("Test ReliableMessageMgr::CheckDuplicateOldMessageClosedExchange", TestReliableMessageProtocol::CheckDuplicateOldMessageClosedExchange), - NL_TEST_DEF("Test that a reply after a standalone ack comes through correctly", TestReliableMessageProtocol::CheckReceiveAfterStandaloneAck), + NL_TEST_DEF("Test ReliableMessageMgr::CheckDuplicateMessageClosedExchange", + TestReliableMessageProtocol::CheckDuplicateMessageClosedExchange), + NL_TEST_DEF("Test ReliableMessageMgr::CheckDuplicateOldMessageClosedExchange", + TestReliableMessageProtocol::CheckDuplicateOldMessageClosedExchange), + NL_TEST_DEF("Test that a reply after a standalone ack comes through correctly", + TestReliableMessageProtocol::CheckReceiveAfterStandaloneAck), NL_TEST_DEF("Test that a reply to a non-MRP message piggybacks an ack if there were MRP things happening on the context before", TestReliableMessageProtocol::CheckPiggybackAfterPiggyback), - NL_TEST_DEF("Test sending an unsolicited ack-soliciting 'standalone ack' message", TestReliableMessageProtocol::CheckSendUnsolicitedStandaloneAckMessage), - NL_TEST_DEF("Test ReliableMessageMgr::CheckSendStandaloneAckMessage", TestReliableMessageProtocol::CheckSendStandaloneAckMessage), + NL_TEST_DEF("Test sending an unsolicited ack-soliciting 'standalone ack' message", + TestReliableMessageProtocol::CheckSendUnsolicitedStandaloneAckMessage), + NL_TEST_DEF("Test ReliableMessageMgr::CheckSendStandaloneAckMessage", + TestReliableMessageProtocol::CheckSendStandaloneAckMessage), NL_TEST_DEF("Test command, response, default response, with receiver closing exchange after sending response", TestReliableMessageProtocol::CheckMessageAfterClosed), - NL_TEST_DEF("Test that unencrypted message is dropped if exchange requires encryption", TestReliableMessageProtocol::CheckUnencryptedMessageReceiveFailure), + NL_TEST_DEF("Test that unencrypted message is dropped if exchange requires encryption", + TestReliableMessageProtocol::CheckUnencryptedMessageReceiveFailure), NL_TEST_DEF("Test that dropping an application-level message with a piggyback ack works ok once both sides retransmit", TestReliableMessageProtocol::CheckLostResponseWithPiggyback), NL_TEST_DEF("Test that an application-level response-to-response after a lost standalone ack to the initial message works", diff --git a/src/protocols/secure_channel/CASESession.cpp b/src/protocols/secure_channel/CASESession.cpp index 9e6706cc616b9b..1152620e043a08 100644 --- a/src/protocols/secure_channel/CASESession.cpp +++ b/src/protocols/secure_channel/CASESession.cpp @@ -1410,7 +1410,8 @@ CHIP_ERROR CASESession::SendSigma3a() SuccessOrExit(err = helper->ScheduleWork()); mSendSigma3Helper = helper; mExchangeCtxt->WillSendMessage(); - mExchangeCtxt->SetShouldPeerBeActive(true); // When we send sigma3, peer has processed sigma 1 and sent sigma2 which means it is active + mExchangeCtxt->SetShouldPeerBeActive( + true); // When we send sigma3, peer has processed sigma 1 and sent sigma2 which means it is active mState = State::kSendSigma3Pending; } else @@ -1704,7 +1705,8 @@ CHIP_ERROR CASESession::HandleSigma3a(System::PacketBufferHandle && msg) SuccessOrExit(err = helper->ScheduleWork()); mHandleSigma3Helper = helper; mExchangeCtxt->WillSendMessage(); - mExchangeCtxt->SetShouldPeerBeActive(true); // When we receive sigma3, peer has received and processed sigma2 which means it is active + mExchangeCtxt->SetShouldPeerBeActive( + true); // When we receive sigma3, peer has received and processed sigma2 which means it is active mState = State::kHandleSigma3Pending; }