Skip to content

Commit

Permalink
OpenThread: ClearAllSrpHostAndServices should be guarded with CHIP_DE…
Browse files Browse the repository at this point in the history
…VICE_CONFIG_ENABLE_THREAD_SRP_CLIENT

The code block added in #35065 should be guarded, if the thread stack
manager is not pulled in then this function is not available and breaks
the compilation.
  • Loading branch information
shubhamdp committed Oct 29, 2024
1 parent c18a6de commit 3e4a1e9
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ void GenericThreadDriver::ConnectNetwork(ByteSpan networkId, ConnectCallback * c
status = Status::kUnknownError;
}

#if CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT
if (status == Status::kSuccess && ThreadStackMgrImpl().IsThreadAttached())
{
Thread::OperationalDataset currentDataset;
Expand All @@ -206,6 +207,7 @@ void GenericThreadDriver::ConnectNetwork(ByteSpan networkId, ConnectCallback * c
status = Status::kUnknownError;
}
}
#endif // CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT

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

0 comments on commit 3e4a1e9

Please sign in to comment.