Skip to content

Commit

Permalink
Add more debug log to track CASE failure during commission (project-c…
Browse files Browse the repository at this point in the history
…hip#22335)

* Add more debug log to track CASE failure during commision

* Update src/app/OperationalSessionSetup.cpp

Co-authored-by: Boris Zbarsky <[email protected]>

Co-authored-by: Boris Zbarsky <[email protected]>
  • Loading branch information
2 people authored and isiu-apple committed Sep 16, 2022
1 parent 3a0ba5b commit 35c078c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/app/CASESessionManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/OperationalSessionSetup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/messaging/ReliableMessageMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}
Expand Down

0 comments on commit 35c078c

Please sign in to comment.