From 7413508e17ad430fa9a7be986c469196d524fb59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Ba=C5=82ys?= Date: Fri, 17 May 2024 12:38:52 +0200 Subject: [PATCH] [Zephyr] Clear SRP host and services on factory reset (#33501) Added clearing SRP host and services when factory reset is requested. --- src/platform/Zephyr/ConfigurationManagerImpl.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/platform/Zephyr/ConfigurationManagerImpl.cpp b/src/platform/Zephyr/ConfigurationManagerImpl.cpp index 2e937c95f0f9e0..ad70b34da3f30b 100644 --- a/src/platform/Zephyr/ConfigurationManagerImpl.cpp +++ b/src/platform/Zephyr/ConfigurationManagerImpl.cpp @@ -183,6 +183,10 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg) { ChipLogProgress(DeviceLayer, "Performing factory reset"); +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT + ThreadStackMgr().ClearAllSrpHostAndServices(); +#endif // CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT + // Lock the Thread stack to avoid unwanted interaction with settings NVS during factory reset. #ifdef CONFIG_NET_L2_OPENTHREAD ThreadStackMgr().LockThreadStack();