Commit 2e5f9836 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Fix issue for starting Pistache server

parent c0fb2a5b
...@@ -94,15 +94,19 @@ int main(int argc, char** argv) { ...@@ -94,15 +94,19 @@ int main(int argc, char** argv) {
// Currently hard-coded value. TODO: add as config option. // Currently hard-coded value. TODO: add as config option.
string pid_file_name = get_exe_absolute_path("/var/run", udr_cfg.instance); string pid_file_name = get_exe_absolute_path("/var/run", udr_cfg.instance);
if (!is_pid_file_lock_success(pid_file_name.c_str())) { if (!is_pid_file_lock_success(pid_file_name.c_str())) {
Logger::udr_server().error( Logger::udr_server().error("Lock PID file %s failed\n",
"Lock PID file %s failed\n", pid_file_name.c_str()); pid_file_name.c_str());
exit(-EDEADLK); exit(-EDEADLK);
} }
// UDR Pistache API server (HTTP1) // UDR Pistache API server (HTTP1)
Pistache::Address addr( /* Pistache::Address addr(
std::string(inet_ntoa(*((struct in_addr*) &udr_cfg.nudr.addr4))), std::string(inet_ntoa(*((struct in_addr*) &udr_cfg.nudr.addr4))),
Pistache::Port(udr_cfg.nudr.port)); Pistache::Port(udr_cfg.nudr.port));
*/
// TODO: to be updated
Pistache::Address addr(udr_cfg.nudr.addr4, Pistache::Port(udr_cfg.nudr.port));
api_server = new UDRApiServer(addr, udr_app_inst); api_server = new UDRApiServer(addr, udr_app_inst);
api_server->init(2); api_server->init(2);
std::thread udr_manager(&UDRApiServer::start, api_server); std::thread udr_manager(&UDRApiServer::start, api_server);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment