Skip to content

Commit 42026d5

Browse files
committed
Add missing MakeOptional
1 parent 99066ad commit 42026d5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/protocols/secure_channel/CASESession.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ CASESession::PrepareForSessionEstablishment(SessionManager & sessionManager, Fab
477477
mFabricsTable = fabricTable;
478478
mRole = CryptoContext::SessionRole::kResponder;
479479
mSessionResumptionStorage = sessionResumptionStorage;
480-
mLocalMRPConfig = mrpLocalConfig.ValueOr(GetDefaultMRPConfig());
480+
mLocalMRPConfig = MakeOptional(mrpLocalConfig.ValueOr(GetDefaultMRPConfig()));
481481

482482
ChipLogDetail(SecureChannel, "Allocated SecureSession (%p) - waiting for Sigma1 msg",
483483
mSecureSessionHolder.Get().Value()->AsSecureSession());
@@ -525,7 +525,7 @@ CHIP_ERROR CASESession::EstablishSession(SessionManager & sessionManager, Fabric
525525
mFabricsTable = fabricTable;
526526
mFabricIndex = fabricInfo->GetFabricIndex();
527527
mSessionResumptionStorage = sessionResumptionStorage;
528-
mLocalMRPConfig = mrpLocalConfig.ValueOr(GetDefaultMRPConfig());
528+
mLocalMRPConfig = MakeOptional(mrpLocalConfig.ValueOr(GetDefaultMRPConfig()));
529529

530530
mExchangeCtxt.Value()->UseSuggestedResponseTimeout(kExpectedSigma1ProcessingTime);
531531
mPeerNodeId = peerScopedNodeId.GetNodeId();

src/protocols/secure_channel/PASESession.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ CHIP_ERROR PASESession::WaitForPairing(SessionManager & sessionManager, const Sp
195195
mIterationCount = pbkdf2IterCount;
196196
mNextExpectedMsg.SetValue(MsgType::PBKDFParamRequest);
197197
mPairingComplete = false;
198-
mLocalMRPConfig = mrpLocalConfig.ValueOr(GetDefaultMRPConfig());
198+
mLocalMRPConfig = MakeOptional(mrpLocalConfig.ValueOr(GetDefaultMRPConfig()));
199199

200200
ChipLogDetail(SecureChannel, "Waiting for PBKDF param request");
201201

@@ -225,7 +225,7 @@ CHIP_ERROR PASESession::Pair(SessionManager & sessionManager, uint32_t peerSetUp
225225

226226
mExchangeCtxt.Value()->UseSuggestedResponseTimeout(kExpectedLowProcessingTime);
227227

228-
mLocalMRPConfig = mrpLocalConfig.ValueOr(GetDefaultMRPConfig());
228+
mLocalMRPConfig = MakeOptional(mrpLocalConfig.ValueOr(GetDefaultMRPConfig()));
229229

230230
err = SendPBKDFParamRequest();
231231
SuccessOrExit(err);

0 commit comments

Comments
 (0)