Skip to content

Commit

Permalink
Fixed up Session ID logging (#13548)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>

* Update src/transport/SessionManager.cpp

Co-authored-by: Tennessee Carmel-Veilleux <[email protected]>

* Update src/transport/SessionManager.cpp

Co-authored-by: Martin Turon <[email protected]>

* Update src/transport/SessionManager.cpp

Co-authored-by: Martin Turon <[email protected]>

Co-authored-by: Tennessee Carmel-Veilleux <[email protected]>
Co-authored-by: Martin Turon <[email protected]>
  • Loading branch information
3 people authored and pull[bot] committed Feb 16, 2022
1 parent b955437 commit 3962933
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/transport/SessionManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 3962933

Please sign in to comment.