Skip to content

Commit

Permalink
[Zephyr] Clear SRP host and services on factory reset (#33501)
Browse files Browse the repository at this point in the history
Added clearing SRP host and services when factory reset is
requested.
  • Loading branch information
ArekBalysNordic authored and pull[bot] committed Jun 13, 2024
1 parent d0ef5d8 commit 7413508
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/platform/Zephyr/ConfigurationManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 7413508

Please sign in to comment.