bugfixing
This commit is contained in:
@@ -38,9 +38,7 @@ FlippRServer::FlippRServer() :
|
|||||||
help_requested(false),
|
help_requested(false),
|
||||||
input_port(9980),
|
input_port(9980),
|
||||||
output_port(9981)
|
output_port(9981)
|
||||||
{
|
{}
|
||||||
this->parse_server_config_file();
|
|
||||||
}
|
|
||||||
|
|
||||||
void FlippRServer::parse_server_config_file()
|
void FlippRServer::parse_server_config_file()
|
||||||
{
|
{
|
||||||
@@ -93,6 +91,7 @@ void FlippRServer::uninitialize()
|
|||||||
*/
|
*/
|
||||||
void FlippRServer::initialize(Application &self)
|
void FlippRServer::initialize(Application &self)
|
||||||
{
|
{
|
||||||
|
this->parse_server_config_file();
|
||||||
//Todo May restructure with subsystems
|
//Todo May restructure with subsystems
|
||||||
//make this one application and subsystems ServerApplications
|
//make this one application and subsystems ServerApplications
|
||||||
|
|
||||||
@@ -155,21 +154,13 @@ void FlippRServer::initialize_input_driver()
|
|||||||
|
|
||||||
int FlippRServer::main(const std::vector<std::string>& args)
|
int FlippRServer::main(const std::vector<std::string>& args)
|
||||||
{
|
{
|
||||||
if(help_requested)
|
if(!help_requested)
|
||||||
return Application::EXIT_OK;
|
{
|
||||||
|
|
||||||
std::unique_ptr<HTTPServer> output_server(this->build_output_server());
|
|
||||||
output_server->start();
|
|
||||||
|
|
||||||
std::unique_ptr<TCPServer> input_server(this->build_input_server());
|
|
||||||
|
|
||||||
logger().information("Server running!");
|
logger().information("Server running!");
|
||||||
|
|
||||||
waitForTerminationRequest();
|
waitForTerminationRequest();
|
||||||
this->output_driver->deactivate_all_lamps();
|
}
|
||||||
this->output_driver->deactivate_displays();
|
|
||||||
output_server->stop();
|
|
||||||
return Application::EXIT_OK;
|
return Application::EXIT_OK;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HTTPServer* FlippRServer::build_output_server()
|
HTTPServer* FlippRServer::build_output_server()
|
||||||
|
|||||||
Reference in New Issue
Block a user