Skip to content

Commit

Permalink
Fix joining fabric print in ChipDeviceController (#21297)
Browse files Browse the repository at this point in the history
* Fix joining fabric print to actually emit a sensible compressed fabric ID by moving it to the right location

* Review fixes

* Added FabricID to the print

Co-authored-by: Tennessee Carmel-Veilleux <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed Dec 17, 2022
1 parent c37d61e commit 1096060
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/controller/CHIPDeviceController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,15 @@ CHIP_ERROR DeviceController::Init(ControllerInitParams params)

mSystemState = params.systemState->Retain();
mState = State::Initialized;

if (GetFabricIndex() != kUndefinedFabricIndex)
{
ChipLogProgress(Controller,
"Joined the fabric at index %d. Fabric ID is 0x" ChipLogFormatX64
" (Compressed Fabric ID: " ChipLogFormatX64 ")",
GetFabricIndex(), ChipLogValueX64(GetFabricId()), ChipLogValueX64(GetCompressedFabricId()));
}

return CHIP_NO_ERROR;
}

Expand Down Expand Up @@ -311,9 +320,6 @@ CHIP_ERROR DeviceController::InitControllerNOCChain(const ControllerInitParams &

mFabricIndex = fabricIndex;

ChipLogProgress(Controller, "Joined the fabric at index %d. Compressed fabric ID is: 0x" ChipLogFormatX64, GetFabricIndex(),
ChipLogValueX64(GetCompressedFabricId()));

return CHIP_NO_ERROR;
}

Expand Down

0 comments on commit 1096060

Please sign in to comment.