From 493dcc36b314a93669e5e4115418924daa0e8763 Mon Sep 17 00:00:00 2001 From: Patryk Lipinski Date: Fri, 1 Mar 2024 11:31:46 +0100 Subject: [PATCH] [nrf noup] Clear srp implementation. This commit implements the host srp clear, using cherry-picked upstream solution. Signed-off-by: Patryk Lipinski --- src/platform/Zephyr/ConfigurationManagerImpl.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/platform/Zephyr/ConfigurationManagerImpl.cpp b/src/platform/Zephyr/ConfigurationManagerImpl.cpp index 15017bb800..a3763c4c84 100644 --- a/src/platform/Zephyr/ConfigurationManagerImpl.cpp +++ b/src/platform/Zephyr/ConfigurationManagerImpl.cpp @@ -42,7 +42,7 @@ #ifdef CONFIG_NET_L2_OPENTHREAD #include -#endif +#endif namespace chip { namespace DeviceLayer { @@ -181,6 +181,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();