From 19df06349d311377ca1ef10f91ef1f786b41418b Mon Sep 17 00:00:00 2001 From: imarom Date: Tue, 24 Jan 2017 14:11:32 +0200 Subject: code review cleanups - C++ Signed-off-by: imarom --- src/rpc-server/commands/trex_rpc_cmd_general.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/rpc-server/commands') diff --git a/src/rpc-server/commands/trex_rpc_cmd_general.cpp b/src/rpc-server/commands/trex_rpc_cmd_general.cpp index 6f0ab09a..c20c77d4 100644 --- a/src/rpc-server/commands/trex_rpc_cmd_general.cpp +++ b/src/rpc-server/commands/trex_rpc_cmd_general.cpp @@ -901,12 +901,16 @@ TrexRpcCmdCapture::parse_cmd_start(const Json::Value ¶ms, Json::Value &resul /* populate the filter */ for (int i = 0; i < tx_json.size(); i++) { uint8_t tx_port = parse_byte(tx_json, i, result); + validate_port_id(tx_port, result); + filter.add_tx(tx_port); ports.insert(tx_port); } for (int i = 0; i < rx_json.size(); i++) { uint8_t rx_port = parse_byte(rx_json, i, result); + validate_port_id(rx_port, result); + filter.add_rx(rx_port); ports.insert(rx_port); } @@ -922,6 +926,7 @@ TrexRpcCmdCapture::parse_cmd_start(const Json::Value ¶ms, Json::Value &resul static MsgReply reply; reply.reset(); + /* send a start message to RX core */ TrexStatelessRxCaptureStart *start_msg = new TrexStatelessRxCaptureStart(filter, limit, reply); get_stateless_obj()->send_msg_to_rx(start_msg); @@ -931,7 +936,7 @@ TrexRpcCmdCapture::parse_cmd_start(const Json::Value ¶ms, Json::Value &resul } result["result"]["capture_id"] = rc.get_new_id(); - result["result"]["ts"] = now_sec(); + result["result"]["start_ts"] = rc.get_start_ts(); } /** -- cgit 1.2.3-korg