From 35c078cf9b608ec8232f950ba40c8c010b773022 Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Thu, 1 Sep 2022 09:04:44 -0700 Subject: [PATCH] Add more debug log to track CASE failure during commission (#22335) * Add more debug log to track CASE failure during commision * Update src/app/OperationalSessionSetup.cpp Co-authored-by: Boris Zbarsky Co-authored-by: Boris Zbarsky --- src/app/CASESessionManager.cpp | 6 ++++++ src/app/OperationalSessionSetup.cpp | 2 +- src/messaging/ReliableMessageMgr.cpp | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/app/CASESessionManager.cpp b/src/app/CASESessionManager.cpp index 93787a9040bdf5..447d7a663d388f 100644 --- a/src/app/CASESessionManager.cpp +++ b/src/app/CASESessionManager.cpp @@ -90,6 +90,12 @@ void CASESessionManager::UpdatePeerAddress(ScopedNodeId peerId) return; } } + else + { + ChipLogDetail(CASESessionManager, + "UpdatePeerAddress: Found existing OperationalSessionSetup instance for peerId[" ChipLogFormatX64 "]", + ChipLogValueX64(peerId.GetNodeId())); + } session->PerformAddressUpdate(); } diff --git a/src/app/OperationalSessionSetup.cpp b/src/app/OperationalSessionSetup.cpp index 3a0d124297a091..38aa12566c59b8 100644 --- a/src/app/OperationalSessionSetup.cpp +++ b/src/app/OperationalSessionSetup.cpp @@ -411,7 +411,7 @@ void OperationalSessionSetup::PerformAddressUpdate() CHIP_ERROR err = LookupPeerAddress(); if (err != CHIP_NO_ERROR) { - ChipLogError(Controller, "PerformAddressUpdate could not perform lookup"); + ChipLogError(Controller, "Failed to look up peer address: %" CHIP_ERROR_FORMAT, err.Format()); DequeueConnectionCallbacks(err); // Do not touch `this` instance anymore; it has been destroyed in DequeueConnectionCallbacks. return; diff --git a/src/messaging/ReliableMessageMgr.cpp b/src/messaging/ReliableMessageMgr.cpp index d37c186d3daf3a..2f855152b47155 100644 --- a/src/messaging/ReliableMessageMgr.cpp +++ b/src/messaging/ReliableMessageMgr.cpp @@ -322,6 +322,7 @@ CHIP_ERROR ReliableMessageMgr::SendFromRetransTable(RetransTableEntry * entry) // After the first failure notify session manager to refresh device data if (entry->sendCount == 1 && mSessionUpdateDelegate != nullptr) { + ChipLogDetail(ExchangeManager, "Notify session manager to update peer address"); mSessionUpdateDelegate->UpdatePeerAddress(entry->ec->GetSessionHandle()->GetPeer()); } }