refactor(Core): rename namespaces and macros to acore (#2454)

This commit is contained in:
Viste
2019-12-01 15:13:31 +03:00
committed by Francesco Borzì
parent e19e95e5d0
commit e22d78ecd6
278 changed files with 1292 additions and 1309 deletions

View File

@@ -38,7 +38,7 @@ add_dependencies(authserver revision.h)
if(NOT WIN32)
set_target_properties(authserver PROPERTIES
COMPILE_DEFINITIONS _TRINITY_REALM_CONFIG="${CONF_DIR}/authserver.conf")
COMPILE_DEFINITIONS _ACORE_REALM_CONFIG="${CONF_DIR}/authserver.conf")
endif()
target_link_libraries(authserver

View File

@@ -35,8 +35,8 @@
#define PROCESS_HIGH_PRIORITY -15 // [-20, 19], default is 0
#endif
#ifndef _TRINITY_REALM_CONFIG
# define _TRINITY_REALM_CONFIG "authserver.conf"
#ifndef _ACORE_REALM_CONFIG
# define _ACORE_REALM_CONFIG "authserver.conf"
#endif
bool StartDB();
@@ -47,7 +47,7 @@ bool stopEvent = false; // Setting it to tru
LoginDatabaseWorkerPool LoginDatabase; // Accessor to the authserver database
/// Handle authserver's termination signals
class AuthServerSignalHandler : public Trinity::SignalHandler
class AuthServerSignalHandler : public acore::SignalHandler
{
public:
virtual void HandleSignal(int sigNum)
@@ -74,7 +74,7 @@ void usage(const char* prog)
extern int main(int argc, char** argv)
{
// Command line parsing to get the configuration file name
char const* configFile = _TRINITY_REALM_CONFIG;
char const* configFile = _ACORE_REALM_CONFIG;
int count = 1;
while (count < argc)
{
@@ -92,7 +92,7 @@ extern int main(int argc, char** argv)
++count;
}
std::string cfg_def_file=_TRINITY_REALM_CONFIG;
std::string cfg_def_file=_ACORE_REALM_CONFIG;
cfg_def_file += ".dist";
if (!sConfigMgr->LoadInitial(cfg_def_file.c_str())) {

View File

@@ -129,7 +129,7 @@ typedef struct AuthHandler
#endif
// Launch a thread to transfer a patch to the client
class PatcherRunnable: public ACORE::Runnable
class PatcherRunnable: public acore::Runnable
{
public:
PatcherRunnable(class AuthSocket*);
@@ -329,7 +329,7 @@ bool AuthSocket::_HandleLogonChallenge()
// pussywizard: logon flood protection:
{
TRINITY_GUARD(ACE_Thread_Mutex, LastLoginAttemptMutex);
ACORE_GUARD(ACE_Thread_Mutex, LastLoginAttemptMutex);
std::string ipaddr = socket().getRemoteAddress();
uint32 currTime = time(NULL);
std::map<std::string, uint32>::iterator itr = LastLoginAttemptTimeForIP.find(ipaddr);
@@ -1145,7 +1145,7 @@ bool AuthSocket::_HandleXferResume()
socket().recv((char*)&start, sizeof(start));
fseek(pPatch, long(start), 0);
ACORE::Thread u(new PatcherRunnable(this));
acore::Thread u(new PatcherRunnable(this));
return true;
}
@@ -1181,7 +1181,7 @@ bool AuthSocket::_HandleXferAccept()
socket().recv_skip(1); // clear input buffer
fseek(pPatch, 0, 0);
ACORE::Thread u(new PatcherRunnable(this));
acore::Thread u(new PatcherRunnable(this));
return true;
}