Skip to content

Commit

Permalink
change function name 'SetCallback' as 'SetHasCallback'
Browse files Browse the repository at this point in the history
  • Loading branch information
tttttangTH committed Nov 9, 2020
1 parent d64e793 commit cc2ef9e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/rest/resource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down Expand Up @@ -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());
}

Expand Down Expand Up @@ -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());
}

Expand Down Expand Up @@ -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<Resource *>(this), &aResponse, _1, _2));
Expand Down Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion src/rest/response.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ void Response::SetResponsCode(std::string &aCode)
mCode = aCode;
}

void Response::SetCallback(void)
void Response::SetHasCallback(void)
{
mCallback = true;
}
Expand Down
2 changes: 1 addition & 1 deletion src/rest/response.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit cc2ef9e

Please sign in to comment.