Skip to content

Commit

Permalink
fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
DejinChen committed Sep 5, 2024
1 parent f4a81a6 commit 0fefbc1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ CHIP_ERROR ThreadScanResponseToTLV::EncodeTo(TLV::TLVWriter & writer, TLV::Tag t
} // namespace

#if CHIP_DEVICE_CONFIG_SUPPORTS_CONCURRENT_CONNECTION
IntrusiveList<InstanceListNode> Instance::sInstances;
IntrusiveList<Instance> Instance::sInstances;
#endif

Instance::Instance(EndpointId aEndpointId, WiFiDriver * apDelegate) :
Expand Down
19 changes: 11 additions & 8 deletions src/app/clusters/network-commissioning/network-commissioning.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,11 @@ namespace app {
namespace Clusters {
namespace NetworkCommissioning {

// Instance inherits privately from this class to participate in Instance::sInstances
class InstanceListNode : public IntrusiveListNodeBase<>
{
};

// TODO: Use macro to disable some wifi or thread
class Instance : public CommandHandlerInterface,
public AttributeAccessInterface,
#if CHIP_DEVICE_CONFIG_SUPPORTS_CONCURRENT_CONNECTION
private InstanceListNode,
public IntrusiveListNodeBase<>,
#endif
public DeviceLayer::NetworkCommissioning::Internal::BaseDriver::NetworkStatusChangeCallback,
public DeviceLayer::NetworkCommissioning::Internal::WirelessDriver::ConnectCallback,
Expand Down Expand Up @@ -92,7 +87,7 @@ class Instance : public CommandHandlerInterface,

// TODO: This could be guarded by a separate multi-interface condition instead
#if CHIP_DEVICE_CONFIG_SUPPORTS_CONCURRENT_CONNECTION
static IntrusiveList<InstanceListNode> sInstances;
static IntrusiveList<Instance> sInstances;
#endif

EndpointId mEndpointId = kInvalidEndpointId;
Expand Down Expand Up @@ -150,7 +145,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.
Expand Down

0 comments on commit 0fefbc1

Please sign in to comment.