Skip to content

Commit

Permalink
Add fabricIndex as a member of ControllerInitParams (#12257)
Browse files Browse the repository at this point in the history
  • Loading branch information
vivien-apple authored and pull[bot] committed Aug 9, 2023
1 parent bdd749b commit 2725810
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/controller/CHIPDeviceController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ CHIP_ERROR DeviceController::Init(ControllerInitParams params)
VerifyOrReturnError(params.operationalCredentialsDelegate != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
mOperationalCredentialsDelegate = params.operationalCredentialsDelegate;

mFabricIndex = params.fabricIndex;
ReturnErrorOnFailure(ProcessControllerNOCChain(params));

DeviceProxyInitParams deviceInitParams = {
Expand Down
3 changes: 2 additions & 1 deletion src/controller/CHIPDeviceController.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ struct ControllerInitParams

uint16_t controllerVendorId;

FabricId fabricId = kUndefinedFabricId;
FabricIndex fabricIndex = kMinValidFabricIndex;
FabricId fabricId = kUndefinedFabricId;
};

enum CommissioningStage : uint8_t
Expand Down
1 change: 1 addition & 0 deletions src/controller/CHIPDeviceControllerFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ void DeviceControllerFactory::PopulateInitParams(ControllerInitParams & controll
controllerParams.controllerNOC = params.controllerNOC;
controllerParams.controllerICAC = params.controllerICAC;
controllerParams.controllerRCAC = params.controllerRCAC;
controllerParams.fabricIndex = params.fabricIndex;
controllerParams.fabricId = params.fabricId;
controllerParams.storageDelegate = params.storageDelegate;

Expand Down
3 changes: 2 additions & 1 deletion src/controller/CHIPDeviceControllerFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ struct SetupParams
ByteSpan controllerICAC;
ByteSpan controllerRCAC;

FabricId fabricId = kUndefinedFabricId;
FabricIndex fabricIndex = kMinValidFabricIndex;
FabricId fabricId = kUndefinedFabricId;

uint16_t controllerVendorId;

Expand Down

0 comments on commit 2725810

Please sign in to comment.