summaryrefslogtreecommitdiffstats
path: root/src/rpc-server/trex_rpc_server.cpp
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2015-10-11 14:42:24 +0200
committerimarom <imarom@cisco.com>2015-10-11 14:42:24 +0200
commit6c7880b9881ed6690954f0c29259dd0b584b3970 (patch)
treef8d23267dc0e086f1c622418e8bf68a04d38e64d /src/rpc-server/trex_rpc_server.cpp
parent3b827c9584c28d3f1f573e372f646edfe9f5f007 (diff)
DP cores now inject a single packet as a dummy to see stats
Diffstat (limited to 'src/rpc-server/trex_rpc_server.cpp')
-rw-r--r--src/rpc-server/trex_rpc_server.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/rpc-server/trex_rpc_server.cpp b/src/rpc-server/trex_rpc_server.cpp
index 8749c9b4..a14e6f97 100644
--- a/src/rpc-server/trex_rpc_server.cpp
+++ b/src/rpc-server/trex_rpc_server.cpp
@@ -30,7 +30,7 @@ limitations under the License.
/************** RPC server interface ***************/
-TrexRpcServerInterface::TrexRpcServerInterface(const TrexRpcServerConfig &cfg, const std::string &name) : m_cfg(cfg), m_name(name) {
+TrexRpcServerInterface::TrexRpcServerInterface(const TrexRpcServerConfig &cfg, const std::string &name, std::mutex *lock) : m_cfg(cfg), m_name(name), m_lock(lock) {
m_is_running = false;
m_is_verbose = false;
}
@@ -114,16 +114,17 @@ get_current_date_time() {
const std::string TrexRpcServer::s_server_uptime = get_current_date_time();
TrexRpcServer::TrexRpcServer(const TrexRpcServerConfig *req_resp_cfg,
- const TrexRpcServerConfig *async_cfg) {
+ const TrexRpcServerConfig *async_cfg,
+ std::mutex *lock) {
/* add the request response server */
if (req_resp_cfg) {
- m_servers.push_back(new TrexRpcServerReqRes(*req_resp_cfg));
+ m_servers.push_back(new TrexRpcServerReqRes(*req_resp_cfg, lock));
}
/* add async publisher */
if (async_cfg) {
- m_servers.push_back(new TrexRpcServerAsync(*async_cfg));
+ m_servers.push_back(new TrexRpcServerAsync(*async_cfg, lock));
}
}