summaryrefslogtreecommitdiffstats
path: root/src/rpc-server/trex_rpc_cmd.cpp
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2015-10-26 18:13:18 +0200
committerimarom <imarom@cisco.com>2015-10-26 18:13:18 +0200
commitb77fef12a08d6d964e522eea6b2d846dfcc98b08 (patch)
tree25074c6aa5ccdc11dba5cfe94c61aaf6d61d9603 /src/rpc-server/trex_rpc_cmd.cpp
parent29550cab54a8d49647f0f2c34b04cc2fc97daaea (diff)
RPC control plane now integarted with DPDK
Diffstat (limited to 'src/rpc-server/trex_rpc_cmd.cpp')
-rw-r--r--src/rpc-server/trex_rpc_cmd.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rpc-server/trex_rpc_cmd.cpp b/src/rpc-server/trex_rpc_cmd.cpp
index 920a8d30..af0db3f4 100644
--- a/src/rpc-server/trex_rpc_cmd.cpp
+++ b/src/rpc-server/trex_rpc_cmd.cpp
@@ -61,7 +61,7 @@ TrexRpcCommand::verify_ownership(const Json::Value &params, Json::Value &result)
std::string handler = parse_string(params, "handler", result);
uint8_t port_id = parse_port(params, result);
- TrexStatelessPort *port = TrexStateless::get_instance().get_port_by_id(port_id);
+ TrexStatelessPort *port = get_stateless_obj()->get_port_by_id(port_id);
if (!port->verify_owner_handler(handler)) {
generate_execute_err(result, "invalid handler provided. please pass the handler given when calling 'acquire' or take ownership");
@@ -78,9 +78,9 @@ TrexRpcCommand::parse_port(const Json::Value &params, Json::Value &result) {
void
TrexRpcCommand::validate_port_id(uint8_t port_id, Json::Value &result) {
- if (port_id >= TrexStateless::get_instance().get_port_count()) {
+ if (port_id >= get_stateless_obj()->get_port_count()) {
std::stringstream ss;
- ss << "invalid port id - should be between 0 and " << (int)TrexStateless::get_instance().get_port_count() - 1;
+ ss << "invalid port id - should be between 0 and " << (int)get_stateless_obj()->get_port_count() - 1;
generate_execute_err(result, ss.str());
}
}