From 1006b74a04d8ead8005fa5bb55234dc8c2cf29b4 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 2 Apr 2024 14:17:11 -0400 Subject: [PATCH] Log the node ID of the peer when we log that CASE timed out. --- src/protocols/secure_channel/CASESession.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/protocols/secure_channel/CASESession.cpp b/src/protocols/secure_channel/CASESession.cpp index eec7c61763763a..4436d7fbb77881 100644 --- a/src/protocols/secure_channel/CASESession.cpp +++ b/src/protocols/secure_channel/CASESession.cpp @@ -551,8 +551,9 @@ void CASESession::OnResponseTimeout(ExchangeContext * ec) VerifyOrReturn(ec != nullptr, ChipLogError(SecureChannel, "CASESession::OnResponseTimeout was called by null exchange")); VerifyOrReturn(mExchangeCtxt.HasValue() && (&mExchangeCtxt.Value().Get() == ec), ChipLogError(SecureChannel, "CASESession::OnResponseTimeout exchange doesn't match")); - ChipLogError(SecureChannel, "CASESession timed out while waiting for a response from the peer. Current state was %u", - to_underlying(mState)); + ChipLogError(SecureChannel, + "CASESession timed out while waiting for a response from peer " ChipLogFormatScopedNodeId ". Current state was %u", + ChipLogValueScopedNodeId(ScopedNodeId(mPeerNodeId, mFabricIndex)), to_underlying(mState)); MATTER_TRACE_COUNTER("CASETimeout"); // Discard the exchange so that Clear() doesn't try aborting it. The // exchange will handle that.