summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rpc-server/commands/trex_rpc_cmd_stream.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/rpc-server/commands/trex_rpc_cmd_stream.cpp b/src/rpc-server/commands/trex_rpc_cmd_stream.cpp
index d22fda7d..f148261c 100644
--- a/src/rpc-server/commands/trex_rpc_cmd_stream.cpp
+++ b/src/rpc-server/commands/trex_rpc_cmd_stream.cpp
@@ -475,25 +475,21 @@ TrexRpcCmdStartTraffic::_run(const Json::Value &params, Json::Value &result) {
const Json::Value &mul = parse_object(params, "mul", result);
+
std::string mul_type = parse_string(mul, "type", result);
+ double max_rate = parse_double(mul, "max", result);
/* dispatch according to type of multiplier */
try {
if (mul_type == "raw") {
-
- double m = parse_double(mul, "factor", result);
- port->start_traffic(m, duration);
+ port->start_traffic(max_rate, duration);
} else if (mul_type == "max_bps") {
-
- double max_bps = parse_double(mul, "max", result);
- port->start_traffic_max_bps(max_bps, duration);
+ port->start_traffic_max_bps(max_rate, duration);
} else if (mul_type == "max_pps") {
-
- double max_pps = parse_double(mul, "max", result);
- port->start_traffic_max_pps(max_pps, duration);
+ port->start_traffic_max_pps(max_rate, duration);
}
} catch (const TrexRpcException &ex) {