diff --git a/src/transport/SecureSessionMgr.cpp b/src/transport/SecureSessionMgr.cpp index 83e5da137f7f84..2daf142659d2e7 100644 --- a/src/transport/SecureSessionMgr.cpp +++ b/src/transport/SecureSessionMgr.cpp @@ -257,8 +257,8 @@ CHIP_ERROR SecureSessionMgr::NewPairing(const Optional & state, [this](const Transport::PeerConnectionState & state1) { HandleConnectionExpired(state1); }); } - ChipLogDetail(Inet, "New pairing for device 0x%08" PRIx32 "%08" PRIx32 ", key %d!!", static_cast(peerNodeId >> 32), - static_cast(peerNodeId), peerKeyId); + ChipLogDetail(Inet, "New secure session created for device 0x" ChipLogFormatX64 ", key %d!!", ChipLogValueX64(peerNodeId), + peerKeyId); state = nullptr; ReturnErrorOnFailure( mPeerConnections.CreateNewPeerConnectionState(Optional::Value(peerNodeId), peerKeyId, localKeyId, &state)); @@ -519,10 +519,8 @@ void SecureSessionMgr::SecureMessageDispatch(const PacketHeader & packetHeader, void SecureSessionMgr::HandleConnectionExpired(const Transport::PeerConnectionState & state) { - char addr[Transport::PeerAddress::kMaxToStringSize]; - state.GetPeerAddress().ToString(addr); - - ChipLogDetail(Inet, "Connection from '%s' expired", addr); + NodeId peerNodeId = state.GetPeerNodeId(); + ChipLogDetail(Inet, "Marking old secure session for device 0x" ChipLogFormatX64 " as expired", ChipLogValueX64(peerNodeId)); if (mCB != nullptr) {