From 22457979f2aa82a94f576afecee7b09ad2ff6710 Mon Sep 17 00:00:00 2001 From: Jerry Johns Date: Thu, 13 Jan 2022 17:41:18 -0800 Subject: [PATCH] Fixed up Session ID logging (#13548) * Fixed up Session ID logging This fixes the session ID logging in SessionManager to be more aligned with spec terminology as well as logging both local and peer session IDs to make debugging a lot easier. * Update src/transport/SessionManager.cpp Co-authored-by: Tennessee Carmel-Veilleux * Update src/transport/SessionManager.cpp Co-authored-by: Tennessee Carmel-Veilleux * Update src/transport/SessionManager.cpp Co-authored-by: Martin Turon * Update src/transport/SessionManager.cpp Co-authored-by: Martin Turon Co-authored-by: Tennessee Carmel-Veilleux Co-authored-by: Martin Turon --- 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 5b2e088357fc25..29841f0cde4c2e 100644 --- a/src/transport/SessionManager.cpp +++ b/src/transport/SessionManager.cpp @@ -309,8 +309,8 @@ CHIP_ERROR SessionManager::NewPairing(SessionHolder & sessionHolder, const Optio mSecureSessions.ReleaseSession(session.Value()->AsSecureSession()); } - ChipLogDetail(Inet, "New secure session created for device 0x" ChipLogFormatX64 ", key %d!!", ChipLogValueX64(peerNodeId), - peerSessionId); + ChipLogDetail(Inet, "New secure session created for device 0x" ChipLogFormatX64 ", LSID:%d PSID:%d!", + ChipLogValueX64(peerNodeId), localSessionId, peerSessionId); session = mSecureSessions.CreateNewSecureSession(pairing->GetSecureSessionType(), localSessionId, peerNodeId, pairing->GetPeerCATs(), peerSessionId, fabric, pairing->GetMRPConfig()); ReturnErrorCodeIf(!session.HasValue(), CHIP_ERROR_NO_MEMORY); @@ -472,7 +472,7 @@ void SessionManager::SecureUnicastMessageDispatch(const PacketHeader & packetHea if (!session.HasValue()) { - ChipLogError(Inet, "Data received on an unknown connection (%d). Dropping it!!", packetHeader.GetSessionId()); + ChipLogError(Inet, "Data received on an unknown session (LSID=%d). Dropping it!", packetHeader.GetSessionId()); return; }