summaryrefslogtreecommitdiffstats
path: root/src/rpc-server/src/trex_rpc_jsonrpc_v2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rpc-server/src/trex_rpc_jsonrpc_v2.cpp')
-rw-r--r--src/rpc-server/src/trex_rpc_jsonrpc_v2.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/rpc-server/src/trex_rpc_jsonrpc_v2.cpp b/src/rpc-server/src/trex_rpc_jsonrpc_v2.cpp
index 2eec599a..53811d70 100644
--- a/src/rpc-server/src/trex_rpc_jsonrpc_v2.cpp
+++ b/src/rpc-server/src/trex_rpc_jsonrpc_v2.cpp
@@ -20,7 +20,8 @@ limitations under the License.
*/
#include <trex_rpc_exception_api.h>
#include <trex_rpc_jsonrpc_v2.h>
-#include <trex_rpc_commands.h>
+#include <trex_rpc_cmd_api.h>
+#include <trex_rpc_cmds_table.h>
#include <json/json.h>
@@ -65,13 +66,13 @@ public:
}
virtual void _execute(Json::Value &response) {
- std::string output;
+ Json::Value result;
- TrexRpcCommand::rpc_cmd_rc_e rc = m_cmd->run(m_params, output);
+ TrexRpcCommand::rpc_cmd_rc_e rc = m_cmd->run(m_params, result);
switch (rc) {
case TrexRpcCommand::RPC_CMD_OK:
- response["result"] = output;
+ response["result"] = result["result"];
break;
case TrexRpcCommand::RPC_CMD_PARAM_COUNT_ERR:
@@ -84,8 +85,8 @@ public:
}
virtual void _execute() {
- std::string output;
- m_cmd->run(m_params, output);
+ Json::Value result;
+ m_cmd->run(m_params, result);
}
private: