summaryrefslogtreecommitdiffstats
path: root/src/rpc-server/src/commands/trex_rpc_cmd_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rpc-server/src/commands/trex_rpc_cmd_test.cpp')
-rw-r--r--src/rpc-server/src/commands/trex_rpc_cmd_test.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/rpc-server/src/commands/trex_rpc_cmd_test.cpp b/src/rpc-server/src/commands/trex_rpc_cmd_test.cpp
index f2d4121e..e9cc4665 100644
--- a/src/rpc-server/src/commands/trex_rpc_cmd_test.cpp
+++ b/src/rpc-server/src/commands/trex_rpc_cmd_test.cpp
@@ -95,7 +95,6 @@ TrexRpcCmdPing::_run(const Json::Value &params, Json::Value &result) {
TrexRpcCommand::rpc_cmd_rc_e
TrexRpcCmdGetReg::_run(const Json::Value &params, Json::Value &result) {
vector<string> cmds;
- stringstream ss;
/* validate count */
if (params.size() != 0) {
@@ -104,11 +103,14 @@ TrexRpcCmdGetReg::_run(const Json::Value &params, Json::Value &result) {
TrexRpcCommandsTable::get_instance().query(cmds);
+
+ Json::Value test = Json::arrayValue;
for (auto cmd : cmds) {
- ss << cmd << "\n";
+ test.append(cmd);
}
- result["result"] = ss.str();
+ result["result"] = test;
+
return (RPC_CMD_OK);
}