From cb15dc0fe7a0ead75495829d46313427500e4470 Mon Sep 17 00:00:00 2001 From: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com> Date: Tue, 3 Oct 2023 14:51:13 -0400 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Junior Martinez <67972863+jmartinez-silabs@users.noreply.github.com> --- src/messaging/ExchangeContext.cpp | 4 ++-- src/messaging/ExchangeContext.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/messaging/ExchangeContext.cpp b/src/messaging/ExchangeContext.cpp index 1b7c9a1f32c30a..1c30f88bb7ae92 100644 --- a/src/messaging/ExchangeContext.cpp +++ b/src/messaging/ExchangeContext.cpp @@ -538,7 +538,7 @@ CHIP_ERROR ExchangeContext::HandleMessage(uint32_t messageCounter, const Payload ExchangeHandle ref(*this); // If we received a message from the Peer and we are still expecting a response, we know the peer is active - // If we receive a message from the Peer but if we are not expecting a response, we don't know if the peer is still active + // If we receive a message from the Peer but we are not expecting a response, we don't know if the peer is still active mIsPeerActive = IsResponseExpected(); bool isStandaloneAck = payloadHeader.HasMessageType(Protocols::SecureChannel::MsgType::StandaloneAck); @@ -632,7 +632,7 @@ CHIP_ERROR ExchangeContext::HandleMessage(uint32_t messageCounter, const Payload // is implicitly that response. SetResponseExpected(false); - // If we received the expected response, we don't if the peer is still active after having sent the response + // If we received the expected response, we don't know if the peer is still active after having sent the response mIsPeerActive = false; } diff --git a/src/messaging/ExchangeContext.h b/src/messaging/ExchangeContext.h index 5a48bbe5c4b3dd..aee884189d2e4a 100644 --- a/src/messaging/ExchangeContext.h +++ b/src/messaging/ExchangeContext.h @@ -221,7 +221,7 @@ class DLL_EXPORT ExchangeContext : public ReliableMessageContext, /** * Functions checks with information available in the ExchangeContext if the peer is active or not * - * IF group exchange -> peer is never active + * If group exchange -> peer is never active * If we are not initiator -> peer is active * If ephemeral context -> peer is active * If we received a message and expect a response -> peer is active