Skip to content

Commit 50e78d5

Browse files
Address review comments.
1 parent 568b81f commit 50e78d5

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

src/app/CASEClient.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,9 @@ CHIP_ERROR CASEClient::EstablishSession(const CASEClientInitParams & params, con
5050
VerifyOrReturnError(exchange != nullptr, CHIP_ERROR_INTERNAL);
5151

5252
mCASESession.SetGroupDataProvider(params.groupDataProvider);
53-
// EstablishSession defaults to using the local MRP config, which is what we want.
5453
ReturnErrorOnFailure(mCASESession.EstablishSession(*params.sessionManager, params.fabricTable, peer, exchange,
5554
params.sessionResumptionStorage, params.certificateValidityPolicy, delegate,
56-
NullOptional));
55+
params.mrpLocalConfig));
5756

5857
return CHIP_NO_ERROR;
5958
}

src/app/CASEClient.h

+5
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ struct CASEClientInitParams
3535
FabricTable * fabricTable = nullptr;
3636
Credentials::GroupDataProvider * groupDataProvider = nullptr;
3737

38+
// mrpLocalConfig should not generally be set to anything other than
39+
// NullOptional. Doing that can lead to different parts of the system
40+
// claiming different MRP parameters for the same node.
41+
Optional<ReliableMessageProtocolConfig> mrpLocalConfig = NullOptional;
42+
3843
CHIP_ERROR Validate() const
3944
{
4045
// sessionResumptionStorage can be nullptr when resumption is disabled.

src/app/server/Server.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,9 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams)
313313
.exchangeMgr = &mExchangeMgr,
314314
.fabricTable = &mFabrics,
315315
.groupDataProvider = mGroupsProvider,
316+
// Don't provide an MRP local config, so each CASE initiation will use
317+
// the then-current value.
318+
.mrpLocalConfig = NullOptional,
316319
},
317320
.clientPool = &mCASEClientPool,
318321
.sessionSetupPool = &mSessionSetupPool,

src/controller/CHIPDeviceControllerFactory.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,9 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState(FactoryInitParams params)
270270
.exchangeMgr = stateParams.exchangeMgr,
271271
.fabricTable = stateParams.fabricTable,
272272
.groupDataProvider = stateParams.groupDataProvider,
273+
// Don't provide an MRP local config, so each CASE initiation will use
274+
// the then-current value.
275+
.mrpLocalConfig = NullOptional,
273276
};
274277

275278
CASESessionManagerConfig sessionManagerConfig = {

0 commit comments

Comments
 (0)