diff --git a/src/rest/resource.cpp b/src/rest/resource.cpp index b57b994d78c..75160f4f63f 100644 --- a/src/rest/resource.cpp +++ b/src/rest/resource.cpp @@ -437,7 +437,7 @@ void Resource::PostCurrentNetworkCommission(const Request &aRequest, Response &a exit: if (error == PostError::kPostErrorNone) { - aResponse.SetCallback(); + aResponse.SetHasCallback(); aResponse.SetStartTime(steady_clock::now()); } @@ -472,7 +472,7 @@ void Resource::CurrentNetwork(const Request &aRequest, Response &aResponse) cons void Resource::PutCurrentNetwork(Response &aResponse) const { otInstanceFactoryReset(mInstance); - aResponse.SetCallback(); + aResponse.SetHasCallback(); aResponse.SetStartTime(steady_clock::now()); } @@ -990,7 +990,7 @@ void Resource::Networks(const Request &aRequest, Response &aResponse) const void Resource::PostNetworks(Response &aResponse) const { otInstanceFactoryReset(mInstance); - aResponse.SetCallback(); + aResponse.SetHasCallback(); aResponse.SetStartTime(steady_clock::now()); } @@ -1118,7 +1118,7 @@ void Resource::PostNetworksCallback(const Request &aRequest, Response &aResponse void Resource::GetNetworks(Response &aResponse) const { - aResponse.SetCallback(); + aResponse.SetHasCallback(); aResponse.SetStartTime(steady_clock::now()); auto threadHelper = mNcp->GetThreadHelper(); threadHelper->Scan(std::bind(&Resource::NetworksResponseHandler, const_cast(this), &aResponse, _1, _2)); @@ -1235,7 +1235,7 @@ void Resource::Diagnostic(const Request &aRequest, Response &aResponse) const if (error == OTBR_ERROR_NONE) { aResponse.SetStartTime(steady_clock::now()); - aResponse.SetCallback(); + aResponse.SetHasCallback(); } else { diff --git a/src/rest/response.cpp b/src/rest/response.cpp index c3c680cf726..b51f8daebcd 100644 --- a/src/rest/response.cpp +++ b/src/rest/response.cpp @@ -88,7 +88,7 @@ void Response::SetResponsCode(std::string &aCode) mCode = aCode; } -void Response::SetCallback(void) +void Response::SetHasCallback(void) { mCallback = true; } diff --git a/src/rest/response.hpp b/src/rest/response.hpp index b653d43817b..60a06cf832f 100644 --- a/src/rest/response.hpp +++ b/src/rest/response.hpp @@ -86,7 +86,7 @@ class Response * * */ - void SetCallback(void); + void SetHasCallback(void); /** * This method checks whether this response need to be processed by callback handler later.