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 Nov 1, 2023
1 parent 7030871 commit 185e33a
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 185e33a

Please sign in to comment.