summaryrefslogtreecommitdiffstats
path: root/src/rpc-server/commands/trex_rpc_cmd_stream.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rpc-server/commands/trex_rpc_cmd_stream.cpp')
-rw-r--r--src/rpc-server/commands/trex_rpc_cmd_stream.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/rpc-server/commands/trex_rpc_cmd_stream.cpp b/src/rpc-server/commands/trex_rpc_cmd_stream.cpp
index a5b358d0..88b50089 100644
--- a/src/rpc-server/commands/trex_rpc_cmd_stream.cpp
+++ b/src/rpc-server/commands/trex_rpc_cmd_stream.cpp
@@ -29,19 +29,13 @@ using namespace std;
*
*/
trex_rpc_cmd_rc_e
-TrexRpcCmdGetStatus::_run(const Json::Value &params, Json::Value &result) {
+TrexRpcCmdAddStream::_run(const Json::Value &params, Json::Value &result) {
- /* validate count */
- if (params.size() != 1) {
- generate_err_param_count(result, 0, params.size());
- return (TrexRpcCommand::RPC_CMD_PARAM_COUNT_ERR);
- }
+ check_param_count(params, 1, result);
+ check_field_type(params, "stream", FIELD_TYPE_OBJ, result);
Json::Value &stream = result["stream"];
- if (stream == Json::Value::null) {
- generate_err_param_count
- }
- return (RPC_CMD_OK);
+ return (TREX_RPC_CMD_OK);
}