File tree 2 files changed +14
-1
lines changed
2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 24
24
25
25
#include < app-common/zap-generated/ids/Attributes.h>
26
26
#include < app-common/zap-generated/ids/Clusters.h>
27
+ #include < device_manager/DeviceManager.h>
27
28
28
29
using namespace ::chip;
29
30
using namespace ::chip::app;
@@ -120,7 +121,10 @@ void DeviceSynchronizer::OnReportEnd()
120
121
{
121
122
// Report end is at the end of all attributes (success)
122
123
#if defined(PW_RPC_ENABLED)
123
- AddSynchronizedDevice (mCurrentDeviceData );
124
+ if (!DeviceMgr ().IsCurrentBridgeDevice (mCurrentDeviceData .node_id ))
125
+ {
126
+ AddSynchronizedDevice (mCurrentDeviceData );
127
+ }
124
128
#else
125
129
ChipLogError (NotSpecified, " Cannot synchronize device with fabric bridge: RPC not enabled" );
126
130
#endif
Original file line number Diff line number Diff line change @@ -75,6 +75,15 @@ class DeviceManager : public PairingDelegate
75
75
76
76
void RemoveSyncedDevice (chip::NodeId nodeId);
77
77
78
+ /* *
79
+ * @brief Determines whether a given nodeId corresponds to the "current bridge device," either local or remote.
80
+ *
81
+ * @param nodeId The ID of the node being checked.
82
+ *
83
+ * @return true if the nodeId matches either the local or remote bridge device; otherwise, false.
84
+ */
85
+ bool IsCurrentBridgeDevice (chip::NodeId nodeId) const { return nodeId == mLocalBridgeNodeId || nodeId == mRemoteBridgeNodeId ; }
86
+
78
87
/* *
79
88
* @brief Open the commissioning window for a specific device within its own fabric.
80
89
*
You can’t perform that action at this time.
0 commit comments