diff options
author | 2015-12-20 00:07:44 +0200 | |
---|---|---|
committer | 2015-12-20 00:07:44 +0200 | |
commit | 4ca24cf31919870a684fe78f17c856e0d220e6d5 (patch) | |
tree | f40ab95e52adca3ac713d61eb9fa3fd0d136e4ea /src/rpc-server/commands/trex_rpc_cmd_test.cpp | |
parent | 1895d21485621c3428d045fa0f5b9daf165c8260 (diff) | |
parent | 5cef472bcdc6c0b7e20e5cc42485ed5570c10f8c (diff) |
Merge branch 'master' into dan_stateless
Diffstat (limited to 'src/rpc-server/commands/trex_rpc_cmd_test.cpp')
-rw-r--r-- | src/rpc-server/commands/trex_rpc_cmd_test.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rpc-server/commands/trex_rpc_cmd_test.cpp b/src/rpc-server/commands/trex_rpc_cmd_test.cpp index 3cdddd31..ad4d3bb1 100644 --- a/src/rpc-server/commands/trex_rpc_cmd_test.cpp +++ b/src/rpc-server/commands/trex_rpc_cmd_test.cpp @@ -21,6 +21,7 @@ limitations under the License. #include "trex_rpc_cmds.h" #include <iostream> #include <sstream> +#include <json/json.h> using namespace std; @@ -31,7 +32,7 @@ using namespace std; trex_rpc_cmd_rc_e TrexRpcCmdTestAdd::_run(const Json::Value ¶ms, Json::Value &result) { - result["result"] = parse_int(params, "x", result) + parse_int(params, "y", result); + result["result"] = Json::Value::UInt64(parse_uint64(params, "x", result) + parse_uint64(params, "y", result)); return (TREX_RPC_CMD_OK); } @@ -44,7 +45,7 @@ TrexRpcCmdTestAdd::_run(const Json::Value ¶ms, Json::Value &result) { trex_rpc_cmd_rc_e TrexRpcCmdTestSub::_run(const Json::Value ¶ms, Json::Value &result) { - result["result"] = parse_int(params, "x", result) - parse_int(params, "y", result); + result["result"] = Json::Value::UInt64(parse_uint64(params, "x", result) - parse_uint64(params, "y", result)); return (TREX_RPC_CMD_OK); } |