Skip to content

Commit 6785cfd

Browse files
yufengwangcaPeterC1965
authored andcommitted
[Fabric-Admin] We should only start the reverse commission process if the local fabric bridge is ready. (project-chip#35079)
* [Fabric-Admin] We should only start the reverse commission process if the local fabric is ready. * Fix compile error
1 parent 3704700 commit 6785cfd

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

examples/fabric-admin/commands/fabric-sync/FabricSyncCommand.cpp

+10-7
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,16 @@ void FabricSyncAddBridgeCommand::OnCommissioningComplete(NodeId deviceId, CHIP_E
6464

6565
DeviceMgr().SubscribeRemoteFabricBridge();
6666

67-
// After successful commissioning of the Commissionee, initiate Reverse Commissioning
68-
// via the Commissioner Control Cluster. However, we must first verify that the
69-
// remote Fabric-Bridge supports Fabric Synchronization.
70-
//
71-
// Note: The Fabric-Admin MUST NOT send the RequestCommissioningApproval command
72-
// if the remote Fabric-Bridge lacks Fabric Synchronization support.
73-
DeviceLayer::PlatformMgr().ScheduleWork(CheckFabricBridgeSynchronizationSupport, 0);
67+
if (DeviceMgr().IsLocalBridgeReady())
68+
{
69+
// After successful commissioning of the Commissionee, initiate Reverse Commissioning
70+
// via the Commissioner Control Cluster. However, we must first verify that the
71+
// remote Fabric-Bridge supports Fabric Synchronization.
72+
//
73+
// Note: The Fabric-Admin MUST NOT send the RequestCommissioningApproval command
74+
// if the remote Fabric-Bridge lacks Fabric Synchronization support.
75+
DeviceLayer::PlatformMgr().ScheduleWork(CheckFabricBridgeSynchronizationSupport, 0);
76+
}
7477
}
7578
else
7679
{

0 commit comments

Comments
 (0)