Strip dead Windows-only code paths, add LTO/march build flags, seed default GM account
Removes now-unreachable #ifdef _WIN32 branches across Common/ and the three server binaries (all builds are Linux-only), deletes the entirely unused SEH exception-handling shim and an orphaned vendored MySQL client header. Enables LTO and -march=x86-64-v2 in Release builds for a small free perf win. Also seeds a default GM account (gmadmin/changeme) via database sql files/gm_account.sql so a fresh deploy has something to log into the web admin panel with, switches the MariaDB data directory from a Docker named volume to a host bind mount for visibility/backup, and expands the README with a fuller Docker deployment walkthrough. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1e47731d7a
commit
1998bf4273
27 files changed
+101
-1178
No files matched your search
@@ -360,80 +360,48 @@ void CWorldServer::ServerLoop( )
|
||||
if ( activity == 0 )
|
||||
{
|
||||
pthread_mutex_unlock( &PlayerMutex );
|
||||
#ifdef _WIN32
|
||||
Sleep(1);
|
||||
#else
|
||||
usleep(1);
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
if ( activity < 0 && errno != EINTR )
|
||||
{
|
||||
#ifdef _WIN32
|
||||
Log( MSG_ERROR, "Select command failed. Error #%i", WSAGetLastError() );
|
||||
#else
|
||||
Log( MSG_ERROR, "Select command failed. Error #%i", errno );
|
||||
#endif
|
||||
isActive = false;
|
||||
}
|
||||
if ( FD_ISSET( sckISCII, &fds ) )
|
||||
{
|
||||
int clientinfolen = sizeof( sockaddr_in );
|
||||
#ifdef _WIN32
|
||||
NewSocket = accept( sckISCII, (sockaddr*)&ClientInfo, (int*)&clientinfolen );
|
||||
#else
|
||||
NewSocket = accept( sckISCII, (sockaddr*)&ClientInfo, (socklen_t*)&clientinfolen );
|
||||
#endif
|
||||
// TODO: check if server is full
|
||||
if (NewSocket != INVALID_SOCKET)
|
||||
AddUser( NewSocket, &ClientInfo, true);
|
||||
else
|
||||
{
|
||||
#ifdef _WIN32
|
||||
Log( MSG_ERROR, "Error accepting socket: %i", WSAGetLastError() );
|
||||
#else
|
||||
Log( MSG_ERROR, "Error accepting socket: %i", errno );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( activity < 0 && errno != EINTR )
|
||||
{
|
||||
#ifdef _WIN32
|
||||
Log( MSG_ERROR, "Select command failed. Error #%i", WSAGetLastError() );
|
||||
#else
|
||||
Log( MSG_ERROR, "Select command failed. Error #%i", errno );
|
||||
#endif
|
||||
isActive = false;
|
||||
}
|
||||
if ( FD_ISSET( sock, &fds ) )
|
||||
{
|
||||
int clientinfolen = sizeof( sockaddr_in );
|
||||
#ifdef _WIN32
|
||||
NewSocket = accept( sock, (sockaddr*)&ClientInfo, (int*)&clientinfolen );
|
||||
#else
|
||||
NewSocket = accept( sock, (sockaddr*)&ClientInfo, (socklen_t*)&clientinfolen );
|
||||
#endif
|
||||
// TODO: check if server is full
|
||||
if (NewSocket != INVALID_SOCKET)
|
||||
AddUser( NewSocket, &ClientInfo, false);
|
||||
else
|
||||
{
|
||||
#ifdef _WIN32
|
||||
Log( MSG_ERROR, "Error accepting socket: %i", WSAGetLastError() );
|
||||
#else
|
||||
Log( MSG_ERROR, "Error accepting socket: %i", errno );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
if(!Config.usethreads)
|
||||
HandleClients( &fds );
|
||||
pthread_mutex_unlock( &PlayerMutex );
|
||||
#ifdef _WIN32
|
||||
Sleep(1);
|
||||
#else
|
||||
usleep(1);
|
||||
#endif
|
||||
} while( isActive );
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user