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 committed May 17, 2024
1 parent 8978118 commit 5cc49f7
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 5cc49f7

Please sign in to comment.