From f680238a1c0580029c075ce16cef9ac418001f30 Mon Sep 17 00:00:00 2001 From: chendejin Date: Thu, 5 Sep 2024 12:22:35 +0800 Subject: [PATCH] fix CI --- .../network-commissioning/network-commissioning.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/app/clusters/network-commissioning/network-commissioning.h b/src/app/clusters/network-commissioning/network-commissioning.h index 5e3d6d7698ff35..4a28c70d34a323 100644 --- a/src/app/clusters/network-commissioning/network-commissioning.h +++ b/src/app/clusters/network-commissioning/network-commissioning.h @@ -43,7 +43,7 @@ class InstanceListNode : public IntrusiveListNodeBase<> class Instance : public CommandHandlerInterface, public AttributeAccessInterface, #if CHIP_DEVICE_CONFIG_SUPPORTS_CONCURRENT_CONNECTION - private InstanceListNode, + public InstanceListNode, #endif public DeviceLayer::NetworkCommissioning::Internal::BaseDriver::NetworkStatusChangeCallback, public DeviceLayer::NetworkCommissioning::Internal::WirelessDriver::ConnectCallback, @@ -150,7 +150,15 @@ class Instance : public CommandHandlerInterface, Instance(EndpointId aEndpointId, DeviceLayer::NetworkCommissioning::WiFiDriver * apDelegate); Instance(EndpointId aEndpointId, DeviceLayer::NetworkCommissioning::ThreadDriver * apDelegate); Instance(EndpointId aEndpointId, DeviceLayer::NetworkCommissioning::EthernetDriver * apDelegate); - virtual ~Instance() = default; + virtual ~Instance() + { +#if CHIP_DEVICE_CONFIG_SUPPORTS_CONCURRENT_CONNECTION + if (sInstances.Contains(this)) + { + sInstances.Remove(this); + } +#endif + }; }; // namespace NetworkCommissioning // NetworkDriver for the devices that don't have / don't need a real network driver.