Skip to content

Commit 2a0d794

Browse files
Address issue with CASE session not assuming the right things when NullOptional is passed in.
1 parent 9f4c766 commit 2a0d794

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/app/CASEClient.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
*/
1717

1818
#include <app/CASEClient.h>
19+
#include <messaging/ReliableMessageProtocolConfig.h>
1920

2021
namespace chip {
2122

@@ -49,10 +50,12 @@ CHIP_ERROR CASEClient::EstablishSession(const CASEClientInitParams & params, con
4950
Messaging::ExchangeContext * exchange = params.exchangeMgr->NewContext(session.Value(), &mCASESession);
5051
VerifyOrReturnError(exchange != nullptr, CHIP_ERROR_INTERNAL);
5152

53+
const Optional<ReliableMessageProtocolConfig> & mrpLocalConfig =
54+
params.mrpLocalConfig.HasValue() ? params.mrpLocalConfig : GetLocalMRPConfig();
5255
mCASESession.SetGroupDataProvider(params.groupDataProvider);
5356
ReturnErrorOnFailure(mCASESession.EstablishSession(*params.sessionManager, params.fabricTable, peer, exchange,
5457
params.sessionResumptionStorage, params.certificateValidityPolicy, delegate,
55-
params.mrpLocalConfig));
58+
mrpLocalConfig));
5659

5760
return CHIP_NO_ERROR;
5861
}

0 commit comments

Comments
 (0)