mirror of
https://github.com/espressif/openthread.git
synced 2026-08-12 21:57:47 +00:00
[srp-client] allow callback to be invoked when client is stopped (#6723)
This commit relaxes the condition for invoking the callback from SRP client allowing it to be invoked when client is stopped. Note that the user can call SRP client APIs to add or remove services while it is stopped. A remove request may be processed immediately (if the service has not yet been registered) and then the callback is invoked to notify the caller to reclaim the service entry.
This commit is contained in:
@@ -594,7 +594,6 @@ void Client::InvokeCallback(Error aError) const
|
||||
|
||||
void Client::InvokeCallback(Error aError, const HostInfo &aHostInfo, const Service *aRemovedServices) const
|
||||
{
|
||||
VerifyOrExit(GetState() != kStateStopped);
|
||||
VerifyOrExit(mCallback != nullptr);
|
||||
mCallback(aError, &aHostInfo, mServices.GetHead(), aRemovedServices, mCallbackContext);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user