Implementing issue #428

This commit is contained in:
DennisOSRM 2012-10-04 18:56:58 +02:00
parent 0b2df9892d
commit a502da7c0f
2 changed files with 3 additions and 3 deletions

View File

@ -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();
} }

View File

@ -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();