From 30495530e4938d4b0a6e560835c4bd0302eb2de9 Mon Sep 17 00:00:00 2001 From: Zang MingJie Date: Sat, 30 Oct 2021 04:17:17 +0800 Subject: [PATCH] Fix log message showing wrong exchange direction (#11179) --- src/transport/SessionManager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/transport/SessionManager.cpp b/src/transport/SessionManager.cpp index 285170c3c5c759..f8aa215273eb33 100644 --- a/src/transport/SessionManager.cpp +++ b/src/transport/SessionManager.cpp @@ -374,7 +374,7 @@ void SessionManager::MessageDispatch(const PacketHeader & packetHeader, const Tr ChipLogDetail(Inet, "Received a duplicate message with MessageCounter:" ChipLogFormatMessageCounter " on exchange " ChipLogFormatExchangeId, - packetHeader.GetMessageCounter(), ChipLogValueExchangeIdFromSentHeader(payloadHeader)); + packetHeader.GetMessageCounter(), ChipLogValueExchangeIdFromReceivedHeader(payloadHeader)); } session->GetPeerMessageCounter().Commit(packetHeader.GetMessageCounter()); @@ -459,7 +459,7 @@ void SessionManager::SecureUnicastMessageDispatch(const PacketHeader & packetHea ChipLogDetail(Inet, "Received a duplicate message with MessageCounter:" ChipLogFormatMessageCounter " on exchange " ChipLogFormatExchangeId, - packetHeader.GetMessageCounter(), ChipLogValueExchangeIdFromSentHeader(payloadHeader)); + packetHeader.GetMessageCounter(), ChipLogValueExchangeIdFromReceivedHeader(payloadHeader)); if (!payloadHeader.NeedsAck()) { // If it's a duplicate message, but doesn't require an ack, let's drop it right here to save CPU @@ -521,7 +521,7 @@ void SessionManager::SecureGroupMessageDispatch(const PacketHeader & packetHeade ChipLogDetail(Inet, "Received a duplicate message with MessageCounter:" ChipLogFormatMessageCounter " on exchange " ChipLogFormatExchangeId, - packetHeader.GetMessageCounter(), ChipLogValueExchangeIdFromSentHeader(payloadHeader)); + packetHeader.GetMessageCounter(), ChipLogValueExchangeIdFromReceivedHeader(payloadHeader)); if (!payloadHeader.NeedsAck()) { // If it's a duplicate message, but doesn't require an ack, let's drop it right here to save CPU