X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain.cpp;h=be5ff2fae56ffead6241d1b873c48e680202413d;hb=56f67ecca96efc7b72d03c95c8c42cfb66e31468;hp=3e135a07167787b7d5469790400320f4ac2100be;hpb=c7fcb4c4bc5012a584add81a9509fc1f84c3c688;p=fms.git diff --git a/src/main.cpp b/src/main.cpp index 3e135a0..be5ff2f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,48 +1,4 @@ -#include "../include/global.h" -#include "../include/commandthread.h" +#include "../include/fmsapp.h" +#include -#include - -#ifdef XMEM - #include -#endif - -int main() -{ - - #ifdef XMEM - xmem_disable_print(); - #endif - - std::vector threads; - - srand(time(NULL)); - - SetupDB(); - SetupDefaultOptions(); - - - SetupLogFile(); - - SetupNetwork(); - - LogFile::Instance()->WriteLog(LogFile::LOGLEVEL_INFO,"FMS startup v"FMS_VERSION); - - - StartThreads(threads); - - - //ZThread::Thread commandthread(new CommandThread()); - PThread::Thread commandthread(new CommandThread()); - commandthread.Join(); - - - ShutdownThreads(threads); - - ShutdownNetwork(); - - LogFile::Instance()->WriteLog(LogFile::LOGLEVEL_INFO,"FMS shutdown"); - LogFile::Instance()->WriteNewLine(); - - return 0; -} +POCO_SERVER_MAIN(FMSApp);