diff options
author | imarom <imarom@cisco.com> | 2016-12-01 14:07:27 +0200 |
---|---|---|
committer | imarom <imarom@cisco.com> | 2016-12-01 14:07:27 +0200 |
commit | c420d1fd8c17118f2ccaee4b05b81ec3dd515fa6 (patch) | |
tree | f8a345a69c3e96a1c0b183720e343f3ed821843b /src/rpc-server/commands | |
parent | e5ee9a836a1ec8e4f3d7bf36b821f593c2e4c5b6 (diff) |
refactor RX core
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.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/rpc-server/commands/trex_rpc_cmd_general.cpp b/src/rpc-server/commands/trex_rpc_cmd_general.cpp index cb7d5149..107b7b4b 100644 --- a/src/rpc-server/commands/trex_rpc_cmd_general.cpp +++ b/src/rpc-server/commands/trex_rpc_cmd_general.cpp @@ -776,31 +776,31 @@ TrexRpcCmdSetRxFeature::parse_capture_msg(const Json::Value &msg, TrexStatelessP void TrexRpcCmdSetRxFeature::parse_queue_msg(const Json::Value &msg, TrexStatelessPort *port, Json::Value &result) { - bool enabled = parse_bool(msg, "enabled", result); + bool enabled = parse_bool(msg, "enabled", result); - if (enabled) { + if (enabled) { - uint64_t size = parse_uint32(msg, "size", result); + uint64_t size = parse_uint32(msg, "size", result); - if (size == 0) { - generate_parse_err(result, "queue size cannot be zero"); - } + if (size == 0) { + generate_parse_err(result, "queue size cannot be zero"); + } - try { - port->start_rx_queue(size); - } catch (const TrexException &ex) { - generate_execute_err(result, ex.what()); - } + try { + port->start_rx_queue(size); + } catch (const TrexException &ex) { + generate_execute_err(result, ex.what()); + } - } else { + } else { - try { - port->stop_rx_queue(); - } catch (const TrexException &ex) { - generate_execute_err(result, ex.what()); - } + try { + port->stop_rx_queue(); + } catch (const TrexException &ex) { + generate_execute_err(result, ex.what()); + } - } + } } |