Skip to content

Commit

Permalink
[nrf noup] Clear srp implementation.
Browse files Browse the repository at this point in the history
This commit implements the host srp clear,
using cherry-picked upstream solution.

Signed-off-by: Patryk Lipinski <patryk.lipinski@nordicsemi.no>
  • Loading branch information
LipinskiPNordicSemi committed Mar 1, 2024
1 parent fffbf97 commit 1786e09
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/platform/Zephyr/ConfigurationManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

#ifdef CONFIG_NET_L2_OPENTHREAD
#include <platform/ThreadStackManager.h>
#endif
#endif

namespace chip {
namespace DeviceLayer {
Expand Down Expand Up @@ -181,6 +181,12 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg)
{
ChipLogProgress(DeviceLayer, "Performing factory reset");

#if CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT
ThreadStackMgr().WaitOnSrpClearAllComplete();
ThreadStackMgr().ClearAllSrpHostAndServices();
ThreadStackMgr().NotifySrpClearAllComplete();
#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();
Expand Down

0 comments on commit 1786e09

Please sign in to comment.