summaryrefslogtreecommitdiffstats
path: root/src/rpc-server/src/commands/trex_rpc_cmd_general.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rpc-server/src/commands/trex_rpc_cmd_general.cpp')
-rw-r--r--src/rpc-server/src/commands/trex_rpc_cmd_general.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/rpc-server/src/commands/trex_rpc_cmd_general.cpp b/src/rpc-server/src/commands/trex_rpc_cmd_general.cpp
index 193ce8db..ac35babf 100644
--- a/src/rpc-server/src/commands/trex_rpc_cmd_general.cpp
+++ b/src/rpc-server/src/commands/trex_rpc_cmd_general.cpp
@@ -28,14 +28,11 @@ using namespace std;
* get status
*
*/
-TrexRpcCommand::rpc_cmd_rc_e
+trex_rpc_cmd_rc_e
TrexRpcCmdGetStatus::_run(const Json::Value &params, Json::Value &result) {
/* validate count */
- if (params.size() != 0) {
- generate_err_param_count(result, 0, params.size());
- return (TrexRpcCommand::RPC_CMD_PARAM_COUNT_ERR);
- }
+ check_param_count(params, 0, result);
Json::Value &section = result["result"];
@@ -44,6 +41,7 @@ TrexRpcCmdGetStatus::_run(const Json::Value &params, Json::Value &result) {
section["general"]["build_time"] = get_build_time();
section["general"]["version_user"] = VERSION_USER;
section["general"]["uptime"] = TrexRpcServer::get_server_uptime();
- return (RPC_CMD_OK);
+
+ return (TREX_RPC_CMD_OK);
}