Implementing issue #428
This commit is contained in:
parent
0b2df9892d
commit
a502da7c0f
@ -50,7 +50,7 @@ public:
|
|||||||
config.close();
|
config.close();
|
||||||
}
|
}
|
||||||
} catch(std::exception& e) {
|
} catch(std::exception& e) {
|
||||||
std::cerr << "[config] .ini not found -> Exception: " <<e.what() << std::endl;
|
ERR("[config] " << configFile << " not found -> Exception: " <<e.what());
|
||||||
if(config.is_open())
|
if(config.is_open())
|
||||||
config.close();
|
config.close();
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@ BOOL WINAPI console_ctrl_handler(DWORD ctrl_type)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int main (int, char * argv[0]) {
|
int main (int argc, char * argv[0]) {
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
if(!mlockall(MCL_CURRENT | MCL_FUTURE))
|
if(!mlockall(MCL_CURRENT | MCL_FUTURE))
|
||||||
WARN("Process " << argv[0] << "could not be locked to RAM");
|
WARN("Process " << argv[0] << "could not be locked to RAM");
|
||||||
@ -92,7 +92,7 @@ int main (int, char * argv[0]) {
|
|||||||
pthread_sigmask(SIG_BLOCK, &new_mask, &old_mask);
|
pthread_sigmask(SIG_BLOCK, &new_mask, &old_mask);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ServerConfiguration serverConfig("server.ini");
|
ServerConfiguration serverConfig((argc > 1 ? argv[1] : "server.ini"));
|
||||||
Server * s = ServerFactory::CreateServer(serverConfig);
|
Server * s = ServerFactory::CreateServer(serverConfig);
|
||||||
RequestHandler & h = s->GetRequestHandlerPtr();
|
RequestHandler & h = s->GetRequestHandlerPtr();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user