Skip to content

Commit

Permalink
reslove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tttttangTH committed Oct 2, 2020
1 parent dd61aef commit 8fd94c4
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 67 deletions.
50 changes: 0 additions & 50 deletions script/_nginx_configure

This file was deleted.

2 changes: 1 addition & 1 deletion script/_nginx_server_install
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
# POSSIBILITY OF SUCH DAMAGE.
#

nginx_configure()
nginx_server_install()
{
if command -v nginx; then

Expand Down
2 changes: 1 addition & 1 deletion script/setup
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
. script/_swapfile
. script/_sudo_extend
. script/_disable_services
. script/_nginx_configure
. script/_nginx_server_install

main()
{
Expand Down
4 changes: 2 additions & 2 deletions src/rest/json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ bool JsonString2NetworkConfiguration(std::string &aString, NetworkConfiguration
exit:

cJSON_Delete(jsonOut);

return ret;
}

Expand Down Expand Up @@ -720,7 +720,7 @@ bool JsonString2Bool(std::string aString, std::string aKey, bool &aValue)
exit:

cJSON_Delete(jsonOut);

return ret;
}

Expand Down
24 changes: 12 additions & 12 deletions src/rest/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ std::string Node2JsonString(const NodeInfo &aNode);
/**
* This method formats a vector including serveral Diagnostic object to a Json array and serialize it to a string.
*
* @param[in] aDiagSet A vector including serveral Diagnostic object.
* @param[in] aDiagSet A vector including serveral Diagnostic object.
*
* @returns A string serlialized by a Json array.
*
Expand All @@ -124,7 +124,7 @@ std::string IpAddr2JsonString(const otIp6Address &aAddress);
/**
* This method formats extracts prefixes from a list of config object and format them as Json Array.
*
* @param[in] aConfig an array of config object.
* @param[in] aConfig An array of config object.
*
* @returns A string serlialized by a Json Array.
*
Expand Down Expand Up @@ -224,7 +224,7 @@ std::string Network2JsonString(const otOperationalDataset &aDataset);
/**
* This method formats an error code and an error message to a Json object and serialize it to a string.
*
* @param[in] aErrorCode Error code such as '404'.
* @param[in] aErrorCode An enum HttpStatusCode such as '404'.
* @param[in] aErrorMessage Error message such as '404 Not Found'.
* @param[in] aDescription Detailed error information.
*
Expand All @@ -236,20 +236,20 @@ std::string Error2JsonString(HttpStatusCode aErrorCode, std::string aErrorMessag
/**
* This method decodes a json object to a NetworkConfiguration object .
*
* @param[in] aString a string contains Json object.
* @param[in] aString A string contains Json object.
* @param[out] aNetwork A reference to a NetworkConfiguration instance that could be set within this method.
*
* @returns A bool value that indicates whether the string could be decoded to the NetworkConfiguration object
*
*/
bool JsonString2NetworkConfiguration(std::string aString, NetworkConfiguration &aNetwork);
bool JsonString2NetworkConfiguration(std::string &aString, NetworkConfiguration &aNetwork);

/**
* This method decodes a json object to a NetworkConfiguration object .
*
* @param[in] aString a string contains Json object.
* @param[in] aString A string contains Json object.
* @param[in] aKey The key that may exist in the Json object.
* @param[inout] aValue the string that is the value of the key in this Json object.
* @param[inout] aValue The string that is the value of the key in this Json object.
*
* @returns A bool value that indicates whether the key exist in this Json object.
*
Expand All @@ -259,9 +259,9 @@ bool JsonString2String(std::string aString, std::string aKey, std::string &aValu
/**
* This method decodes a json object to a bool value .
*
* @param[in] aString a string contains Json object.
* @param[in] aString A string contains Json object.
* @param[in] aKey The key that may exist in the Json object.
* @param[inout] aValue the bool value that is the value of the key in this Json object.
* @param[inout] aValue The bool value that is the value of the key in this Json object.
*
* @returns A bool value that indicates whether the key exist in this Json object.
*
Expand All @@ -271,11 +271,11 @@ bool JsonString2Bool(std::string aString, std::string aKey, bool &aValue);
/**
* This method decodes a json object to a bool value .
*
* @param[in] aString a string contains Json object.
* @param[in] aString A string contains Json object.
* @param[in] aKey The key that may exist in the Json object.
* @param[inout] aValue the integer value that is the value of the key in this Json object.
* @param[inout] aValue The integer value that is the value of the key in this Json object.
*
* @returns An bool value that indicates whether the key exist in this Json object.
* @returns A bool value that indicates whether the key exist in this Json object.
*
*/
bool JsonString2Int(std::string aString, std::string aKey, int32_t &aValue);
Expand Down
2 changes: 1 addition & 1 deletion third_party/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#

add_subdirectory(openthread)
if(OTBR_WEB)
if(OTBR_REST)
add_subdirectory(cJSON)
add_subdirectory(http-parser)
endif()

0 comments on commit 8fd94c4

Please sign in to comment.