Skip to content

Commit 7df7676

Browse files
authored
OpenThread: ClearAllSrpHostAndServices should be guarded with CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT (project-chip#36284)
The code block added in project-chip#35065 should be guarded, if the thread stack manager is not pulled in then this function is not available and breaks the compilation.
1 parent 7e0634c commit 7df7676

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ void GenericThreadDriver::ConnectNetwork(ByteSpan networkId, ConnectCallback * c
189189
status = Status::kUnknownError;
190190
}
191191

192+
#if CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT
192193
if (status == Status::kSuccess && ThreadStackMgrImpl().IsThreadAttached())
193194
{
194195
Thread::OperationalDataset currentDataset;
@@ -206,6 +207,7 @@ void GenericThreadDriver::ConnectNetwork(ByteSpan networkId, ConnectCallback * c
206207
status = Status::kUnknownError;
207208
}
208209
}
210+
#endif // CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT
209211

210212
if (status == Status::kSuccess &&
211213
DeviceLayer::ThreadStackMgrImpl().AttachToThreadNetwork(mStagingNetwork, callback) != CHIP_NO_ERROR)

0 commit comments

Comments
 (0)