mirror of
https://github.com/SWG-Source/src.git
synced 2026-08-27 16:56:28 -04:00
import our profiler related changes
This commit is contained in:
@@ -59,5 +59,9 @@ int main(int argc, char ** argv)
|
||||
NetworkHandler::remove();
|
||||
SetupSharedFoundation::remove();
|
||||
|
||||
#ifdef ENABLE_PROFILING
|
||||
exit(0);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -39,5 +39,9 @@ int main(int argc, char ** argv)
|
||||
ChatServer::run();
|
||||
SetupSharedFoundation::remove();
|
||||
|
||||
#ifdef ENABLE_PROFILING
|
||||
exit(0);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -54,6 +54,10 @@ int main(int argc, char **argv)
|
||||
SetupSharedFoundation::remove();
|
||||
SetupSharedThread::remove();
|
||||
|
||||
#ifdef ENABLE_PROFILING
|
||||
exit(0);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -154,6 +154,10 @@ void LogServer::setDone(char const *reasonfmt, ...)
|
||||
va_end(ap);
|
||||
m_done = true;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_PROFILING
|
||||
std::exit(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#include "sharedFoundation/FirstSharedFoundation.h"
|
||||
|
||||
#ifdef ENABLE_PROFILING
|
||||
#include <signal.h>
|
||||
#endif
|
||||
|
||||
#include "ConfigLoginServer.h"
|
||||
#include "LoginServer.h"
|
||||
|
||||
@@ -15,35 +19,49 @@
|
||||
|
||||
// ======================================================================
|
||||
|
||||
int main(int argc, char ** argv)
|
||||
{
|
||||
|
||||
SetupSharedThread::install();
|
||||
SetupSharedDebug::install(1024);
|
||||
|
||||
//-- setup foundation
|
||||
SetupSharedFoundation::Data setupFoundationData(SetupSharedFoundation::Data::D_game);
|
||||
setupFoundationData.lpCmdLine = ConvertCommandLine(argc,argv);
|
||||
setupFoundationData.configFile = "loginServer.cfg";
|
||||
SetupSharedFoundation::install (setupFoundationData);
|
||||
|
||||
if (ConfigFile::isEmpty())
|
||||
FATAL(true, ("No config file specified"));
|
||||
|
||||
SetupSharedCompression::install();
|
||||
|
||||
SetupSharedFile::install(false);
|
||||
SetupSharedNetworkMessages::install();
|
||||
|
||||
SetupSharedRandom::install(static_cast<uint32>(time(nullptr))); //lint !e1924 !e64 // nullptr is a C-Style cast?
|
||||
|
||||
Os::setProgramName("LoginServer");
|
||||
//setup the server
|
||||
ConfigLoginServer::install();
|
||||
|
||||
//-- run game
|
||||
SetupSharedFoundation::callbackWithExceptionHandling(LoginServer::run);
|
||||
SetupSharedFoundation::remove();
|
||||
|
||||
return 0;
|
||||
#ifdef ENABLE_PROFILING
|
||||
inline void signalHandler(int s){
|
||||
printf("LoginServer terminating, signal %d\n",s);
|
||||
exit(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
#ifdef ENABLE_PROFILING
|
||||
struct sigaction sigIntHandler;
|
||||
sigIntHandler.sa_handler = signalHandler;
|
||||
sigemptyset(&sigIntHandler.sa_mask);
|
||||
sigIntHandler.sa_flags = 0;
|
||||
sigaction(SIGINT, &sigIntHandler, NULL);
|
||||
#endif
|
||||
|
||||
SetupSharedThread::install();
|
||||
SetupSharedDebug::install(1024);
|
||||
|
||||
//-- setup foundation
|
||||
SetupSharedFoundation::Data setupFoundationData(SetupSharedFoundation::Data::D_game);
|
||||
setupFoundationData.lpCmdLine = ConvertCommandLine(argc, argv);
|
||||
setupFoundationData.configFile = "loginServer.cfg";
|
||||
SetupSharedFoundation::install(setupFoundationData);
|
||||
|
||||
if (ConfigFile::isEmpty()) {
|
||||
FATAL(true, ("No config file specified"));
|
||||
}
|
||||
|
||||
SetupSharedCompression::install();
|
||||
|
||||
SetupSharedFile::install(false);
|
||||
SetupSharedNetworkMessages::install();
|
||||
|
||||
SetupSharedRandom::install(static_cast<uint32>(time(nullptr))); //lint !e1924 !e64 // nullptr is a C-Style cast?
|
||||
|
||||
Os::setProgramName("LoginServer");
|
||||
//setup the server
|
||||
ConfigLoginServer::install();
|
||||
|
||||
//-- run game
|
||||
SetupSharedFoundation::callbackWithExceptionHandling(LoginServer::run);
|
||||
SetupSharedFoundation::remove();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1509,6 +1509,10 @@ void PlanetServer::setDone(char const *reasonfmt, ...)
|
||||
va_end(ap);
|
||||
m_done = true;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_PROFILING
|
||||
std::exit(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
@@ -41,5 +41,9 @@ int main(int argc, char ** argv)
|
||||
TaskManager::remove();
|
||||
SetupSharedFoundation::remove();
|
||||
|
||||
#ifdef ENABLE_PROFILING
|
||||
exit(0);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user