From c420d1fd8c17118f2ccaee4b05b81ec3dd515fa6 Mon Sep 17 00:00:00 2001 From: imarom Date: Thu, 1 Dec 2016 14:07:27 +0200 Subject: refactor RX core Signed-off-by: imarom --- src/rpc-server/commands/trex_rpc_cmd_general.cpp | 36 ++++++++++++------------ 1 file changed, 18 insertions(+), 18 deletions(-) (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 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()); + } - } + } } -- cgit 1.2.3-korg