summaryrefslogtreecommitdiffstats
path: root/src/rpc-server/commands/trex_rpc_cmd_stream.cpp
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-02-21 11:42:00 -0500
committerimarom <imarom@cisco.com>2016-02-23 03:08:00 -0500
commitd1360da9fbdda884f43400b98c022bbfccf523f4 (patch)
tree937a10160bcaabeb72c76aae0abe38eab5870f42 /src/rpc-server/commands/trex_rpc_cmd_stream.cpp
parentbc7f0b85b85a8deb6bc58bcca32ff11d9289cd92 (diff)
rate is now backward compatiable to API
Diffstat (limited to 'src/rpc-server/commands/trex_rpc_cmd_stream.cpp')
-rw-r--r--src/rpc-server/commands/trex_rpc_cmd_stream.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/rpc-server/commands/trex_rpc_cmd_stream.cpp b/src/rpc-server/commands/trex_rpc_cmd_stream.cpp
index bcfa7df1..74985883 100644
--- a/src/rpc-server/commands/trex_rpc_cmd_stream.cpp
+++ b/src/rpc-server/commands/trex_rpc_cmd_stream.cpp
@@ -59,10 +59,7 @@ TrexRpcCmdAddStream::_run(const Json::Value &params, Json::Value &result) {
stream->m_self_start = parse_bool(section, "self_start", result);
stream->m_flags = parse_int(section, "flags", result);
stream->m_action_count = parse_uint16(section, "action_count", result);
-
- /* parse the rate of the stream */
- const Json::Value &rate = parse_object(section ,"rate", result);
- parse_rate(rate, stream.get(), result);
+
/* inter stream gap */
stream->m_isg_usec = parse_double(section, "isg", result);
@@ -169,6 +166,10 @@ TrexRpcCmdAddStream::allocate_new_stream(const Json::Value &section, uint8_t por
generate_parse_err(result, "bad stream type provided: '" + type + "'");
}
+ /* parse the rate of the stream */
+ const Json::Value &rate = parse_object(mode ,"rate", result);
+ parse_rate(rate, stream, result);
+
return (stream);
}