Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/protocols/secure_channel/PASESession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,15 @@ CHIP_ERROR PASESession::Pair(SessionManager & sessionManager, uint32_t peerSetUp
exit:
if (err != CHIP_NO_ERROR)
{
// If a failure happens before we have placed the incoming exchange into `mExchangeCtxt`, we need to make
// sure to close the exchange to fulfill our API contract.
if (!mExchangeCtxt.HasValue())
{
exchangeCtxt->Close();
}
Clear();
ChipLogError(SecureChannel, "Failed during PASE session pairing request: %" CHIP_ERROR_FORMAT, err.Format());
MATTER_TRACE_COUNTER("PASEFail");
}
return err;
}
Expand Down
2 changes: 2 additions & 0 deletions src/protocols/secure_channel/PASESession.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ class DLL_EXPORT PASESession : public Messaging::UnsolicitedMessageHandler,
* ownership of the exchangeCtxt to PASESession object. PASESession
* will close the exchange on (successful/failed) handshake completion.
* @param delegate Callback object
* The delegate will be notified if and only if Pair() returns success. Errors occurring after Pair()
* returns success will be reported via the delegate.
*
* @return CHIP_ERROR The result of initialization
*/
Expand Down
Loading