summaryrefslogtreecommitdiffstats
path: root/src/rpc-server/commands
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2017-01-24 14:11:32 +0200
committerimarom <imarom@cisco.com>2017-01-24 14:11:32 +0200
commit19df06349d311377ca1ef10f91ef1f786b41418b (patch)
tree3c5fa2e76fd5dd0dff370df7013e757e289b1ac5 /src/rpc-server/commands
parent418fd3d0a7169f2d8934e8be82d11e1a388d681c (diff)
code review cleanups - C++
Signed-off-by: imarom <imarom@cisco.com>
Diffstat (limited to 'src/rpc-server/commands')
-rw-r--r--src/rpc-server/commands/trex_rpc_cmd_general.cpp7
1 files changed, 6 insertions, 1 deletions
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 &params, 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 &params, Json::Value &resul
static MsgReply<TrexCaptureRCStart> 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 &params, Json::Value &resul
}
result["result"]["capture_id"] = rc.get_new_id();
- result["result"]["ts"] = now_sec();
+ result["result"]["start_ts"] = rc.get_start_ts();
}
/**