Skip to content

Commit b540e45

Browse files
committed
components/esp_matter: init NetworkCommissioningCluster
1 parent c34a940 commit b540e45

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

components/esp_matter/data_model_provider/clusters/network_commissioning_integration.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,18 +82,21 @@ void ESPMatterNetworkCommissioningClusterServerInitCallback(EndpointId endpointI
8282
if (endpointId == CONFIG_THREAD_NETWORK_ENDPOINT_ID) {
8383
static DeviceLayer::NetworkCommissioning::GenericThreadDriver sThreadDriver;
8484
gServers[index].Create(endpointId, &sThreadDriver);
85+
gServers[index].Cluster().Init();
8586
(void)esp_matter::data_model::provider::get_instance().registry().Register(gServers[index].Registration());
8687
}
8788
#endif
8889
#ifdef CONFIG_WIFI_NETWORK_COMMISSIONING_DRIVER
8990
if (endpointId == CONFIG_WIFI_NETWORK_ENDPOINT_ID) {
9091
gServers[index].Create(endpointId, &(DeviceLayer::NetworkCommissioning::ESPWiFiDriver::GetInstance()));
92+
gServers[index].Cluster().Init();
9193
(void)esp_matter::data_model::provider::get_instance().registry().Register(gServers[index].Registration());
9294
}
9395
#endif
9496
#ifdef CONFIG_ETHERNET_NETWORK_COMMISSIONING_DRIVER
9597
if (endpointId == CONFIG_ETHERNET_NETWORK_ENDPOINT_ID) {
9698
gServers[index].Create(endpointId, &(DeviceLayer::NetworkCommissioning::ESPEthernetDriver::GetInstance()));
99+
gServers[index].Cluster().Init();
97100
(void)esp_matter::data_model::provider::get_instance().registry().Register(gServers[index].Registration());
98101
}
99102
#endif
@@ -106,16 +109,19 @@ void ESPMatterNetworkCommissioningClusterServerShutdownCallback(EndpointId endpo
106109
#ifdef CONFIG_THREAD_NETWORK_COMMISSIONING_DRIVER
107110
if (endpointId == CONFIG_THREAD_NETWORK_ENDPOINT_ID) {
108111
(void)esp_matter::data_model::provider::get_instance().registry().Unregister(&gServers[index].Cluster());
112+
gServers[index].Cluster().Deinit();
109113
}
110114
#endif
111115
#ifdef CONFIG_WIFI_NETWORK_COMMISSIONING_DRIVER
112116
if (endpointId == CONFIG_WIFI_NETWORK_ENDPOINT_ID) {
113117
(void)esp_matter::data_model::provider::get_instance().registry().Unregister(&gServers[index].Cluster());
118+
gServers[index].Cluster().Deinit();
114119
}
115120
#endif
116121
#ifdef CONFIG_ETHERNET_NETWORK_COMMISSIONING_DRIVER
117122
if (endpointId == CONFIG_ETHERNET_NETWORK_ENDPOINT_ID) {
118123
(void)esp_matter::data_model::provider::get_instance().registry().Unregister(&gServers[index].Cluster());
124+
gServers[index].Cluster().Deinit();
119125
}
120126
#endif
121127
}

0 commit comments

Comments
 (0)