Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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.
ArekBalysNordic authored and pull[bot] committed Jun 19, 2024
1 parent ae912e9 commit 9420652
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
@@ -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();

0 comments on commit 9420652

Please sign in to comment.