summaryrefslogtreecommitdiffstats
path: root/src/rpc-server/trex_rpc_server.cpp
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2015-10-08 10:23:33 +0200
committerimarom <imarom@cisco.com>2015-10-08 10:23:56 +0200
commit09c9d77dc2f5a89924bd27226727220801a5df13 (patch)
tree3db008dbcc1aba670e2ec691051082949d9c6492 /src/rpc-server/trex_rpc_server.cpp
parent74b648a86c16933680b03a736afe3f0305b4f6d2 (diff)
fixed some bugs in the async server
also added affinity to the stateless main object
Diffstat (limited to 'src/rpc-server/trex_rpc_server.cpp')
-rw-r--r--src/rpc-server/trex_rpc_server.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/rpc-server/trex_rpc_server.cpp b/src/rpc-server/trex_rpc_server.cpp
index 18265a0e..8749c9b4 100644
--- a/src/rpc-server/trex_rpc_server.cpp
+++ b/src/rpc-server/trex_rpc_server.cpp
@@ -113,13 +113,18 @@ 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) {
+TrexRpcServer::TrexRpcServer(const TrexRpcServerConfig *req_resp_cfg,
+ const TrexRpcServerConfig *async_cfg) {
/* add the request response server */
- m_servers.push_back(new TrexRpcServerReqRes(req_resp_cfg));
+ if (req_resp_cfg) {
+ m_servers.push_back(new TrexRpcServerReqRes(*req_resp_cfg));
+ }
+
/* add async publisher */
- m_servers.push_back(new TrexRpcServerAsync(async_cfg));
+ if (async_cfg) {
+ m_servers.push_back(new TrexRpcServerAsync(*async_cfg));
+ }
}
TrexRpcServer::~TrexRpcServer() {