mirror of
https://github.com/SWG-Source/src.git
synced 2026-07-28 22:15:49 -04:00
we can build with newer compilers but _must_ use the gcc 5.x libs
This commit is contained in:
+7
-4
@@ -84,11 +84,14 @@ elseif(UNIX)
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Ofast \
|
||||
-fno-signed-zeros -freciprocal-math -ffp-contract=fast \
|
||||
-fno-threadsafe-statics -fslp-vectorize-aggressive -fslp-vectorize \
|
||||
-fno-stack-protector -fstrict-enums -fstrict-vtable-pointers \
|
||||
-fno-coverage-mapping -fno-spell-checking -fshort-enums -finline-functions \
|
||||
-finline-hint-functions -fno-unroll-loops -Wno-undefined-var-template")
|
||||
-fno-stack-protector -fstrict-enums -fno-spell-checking \
|
||||
-fno-coverage-mapping -fstrict-vtable-pointers -finline-functions \
|
||||
-finline-hint-functions -fshort-enums -fno-unroll-loops")
|
||||
|
||||
# these only work on 3.9+ -finline-functions -finline-hint-functions
|
||||
# these only work on 3.8+ -fno-coverage-mapping -fstrict-vtable-pointers
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -ggdb -Wno-undefined-var-template")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -ggdb")
|
||||
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
# O3 and Ofast include one or more flags that cause java to crash when using gcc6
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2 -fno-signed-zeros -freciprocal-math -fno-unroll-loops -fno-tree-loop-optimize")
|
||||
|
||||
@@ -33,9 +33,8 @@
|
||||
#include "serverNetworkMessages/UploadCharacterMessage.h"
|
||||
#include "sharedLog/Log.h"
|
||||
#include "sharedNetworkMessages/ConsoleChannelMessages.h"
|
||||
#include "unicodeArchive/UnicodeArchive.h"
|
||||
|
||||
#include "sharedNetworkMessages/GenericValueTypeMessage.h"
|
||||
#include "unicodeArchive/UnicodeArchive.h"
|
||||
|
||||
#include "sharedFoundation/CrcConstexpr.hpp"
|
||||
|
||||
@@ -127,16 +126,11 @@ void GameServerConnection::onReceive(Archive::ByteStream const &message)
|
||||
}
|
||||
case constcrc("TransferReplyNameValidation") :
|
||||
{
|
||||
GenericValueTypeMessage<std::map<std::string, TransferCharacterData> > const replyNameValidation(ri);
|
||||
auto i = replyNameValidation.getValue().begin();
|
||||
GenericValueTypeMessage<std::pair<std::string, TransferCharacterData> > const replyNameValidation(ri);
|
||||
|
||||
if (i == replyNameValidation.getValue().end()) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (i->second.getTransferRequestSource() == TransferRequestMoveValidation::TRS_transfer_server)
|
||||
if (replyNameValidation.getValue().second.getTransferRequestSource() == TransferRequestMoveValidation::TRS_transfer_server)
|
||||
{
|
||||
LOG("CustomerService", ("CharacterTransfer: Received TransferReplyNameValidation from GameServer, forwarding to TransferServer : %s", i->second.toString().c_str()));
|
||||
LOG("CustomerService", ("CharacterTransfer: Received TransferReplyNameValidation from GameServer, forwarding to TransferServer : %s", replyNameValidation.getValue().second.toString().c_str()));
|
||||
CentralServer::getInstance().sendToTransferServer(replyNameValidation);
|
||||
}
|
||||
else
|
||||
@@ -144,14 +138,14 @@ void GameServerConnection::onReceive(Archive::ByteStream const &message)
|
||||
// pass reply back to the source galaxy for handling, which is to
|
||||
// either display an error message to the user if the request failed,
|
||||
// or to start the transfer process if the request succeeds
|
||||
LOG("CustomerService", ("CharacterTransfer: Received TransferReplyNameValidation from GameServer, forwarding to source galaxy CentralServer : %s", i->second.toString().c_str()));
|
||||
LOG("CustomerService", ("CharacterTransfer: Received TransferReplyNameValidation from GameServer, forwarding to source galaxy CentralServer : %s", replyNameValidation.getValue().second.toString().c_str()));
|
||||
CentralServer::getInstance().sendToArbitraryLoginServer(replyNameValidation);
|
||||
|
||||
// if the request succeeded, also disconnect any clients with a connection to SWG services on this (the target) galaxy
|
||||
if (i->second.getIsValidName() && (i->second.getTransferRequestSource() != TransferRequestMoveValidation::TRS_ingame_freects_command_validate) && (i->second.getTransferRequestSource() != TransferRequestMoveValidation::TRS_ingame_cts_command_validate))
|
||||
if (replyNameValidation.getValue().second.getIsValidName() && (replyNameValidation.getValue().second.getTransferRequestSource() != TransferRequestMoveValidation::TRS_ingame_freects_command_validate) && (replyNameValidation.getValue().second.getTransferRequestSource() != TransferRequestMoveValidation::TRS_ingame_cts_command_validate))
|
||||
{
|
||||
GenericValueTypeMessage<unsigned int> kickSource("TransferKickConnectedClients", i->second.getSourceStationId());
|
||||
GenericValueTypeMessage<unsigned int> kickDestination("TransferKickConnectedClients", i->second.getDestinationStationId());
|
||||
GenericValueTypeMessage<unsigned int> kickSource("TransferKickConnectedClients", replyNameValidation.getValue().second.getSourceStationId());
|
||||
GenericValueTypeMessage<unsigned int> kickDestination("TransferKickConnectedClients", replyNameValidation.getValue().second.getDestinationStationId());
|
||||
CentralServer::getInstance().sendToAllLoginServers(kickSource);
|
||||
CentralServer::getInstance().sendToAllLoginServers(kickDestination);
|
||||
CentralServer::getInstance().sendToAllConnectionServers(kickSource, true);
|
||||
|
||||
@@ -228,32 +228,27 @@ void CentralServerConnection::onReceive(const Archive::ByteStream & message)
|
||||
}
|
||||
case constcrc("TransferReplyNameValidation") :
|
||||
{
|
||||
const GenericValueTypeMessage<std::map<std::string, TransferCharacterData> > replyNameValidation(ri);
|
||||
auto i = replyNameValidation.getValue().begin();
|
||||
|
||||
if (i == replyNameValidation.getValue().end()) {
|
||||
break;
|
||||
}
|
||||
|
||||
if(!i->second.getIsMoveRequest())
|
||||
const GenericValueTypeMessage<std::pair<std::string, TransferCharacterData> > replyNameValidation(ri);
|
||||
if(!replyNameValidation.getValue().second.getIsMoveRequest())
|
||||
{
|
||||
LOG("CustomerService", ("CharacterTransfer: Received replyNameValidation for move validation request. (%s) %s", i->first.c_str(), i->second.toString().c_str()));
|
||||
TransferServer::replyValidateMove(i->second);
|
||||
LOG("CustomerService", ("CharacterTransfer: Received replyNameValidation for move validation request. (%s) %s", replyNameValidation.getValue().first.c_str(), replyNameValidation.getValue().second.toString().c_str()));
|
||||
TransferServer::replyValidateMove(replyNameValidation.getValue().second);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(TransferServer::isRename(i->second))
|
||||
if(TransferServer::isRename(replyNameValidation.getValue().second))
|
||||
{
|
||||
LOG("CustomerService", ("CharacterTransfer: Received replyNameValidation for rename request, starting character rename protocol. (%s) %s", i->first.c_str(), i->second.toString().c_str()));
|
||||
const GenericValueTypeMessage<TransferCharacterData> renameCharacter("TransferRenameCharacter", i->second);
|
||||
CentralServerConnection * centralServerConnection = CentralServerConnection::getCentralServerConnectionForGalaxy(i->second.getSourceGalaxy());
|
||||
LOG("CustomerService", ("CharacterTransfer: Received replyNameValidation for rename request, starting character rename protocol. (%s) %s", replyNameValidation.getValue().first.c_str(), replyNameValidation.getValue().second.toString().c_str()));
|
||||
const GenericValueTypeMessage<TransferCharacterData> renameCharacter("TransferRenameCharacter", replyNameValidation.getValue().second);
|
||||
CentralServerConnection * centralServerConnection = CentralServerConnection::getCentralServerConnectionForGalaxy(replyNameValidation.getValue().second.getSourceGalaxy());
|
||||
if(centralServerConnection)
|
||||
{
|
||||
centralServerConnection->send(renameCharacter, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
TransferServer::transferCreateCharacterFailed(i->second); }
|
||||
TransferServer::transferCreateCharacterFailed(replyNameValidation.getValue().second);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
+2
-1
@@ -104,8 +104,9 @@ public:
|
||||
|
||||
void setCSToolId (const unsigned int toolId);
|
||||
|
||||
TransferCharacterData();
|
||||
private:
|
||||
TransferCharacterData();
|
||||
|
||||
friend class Archive::AutoVariable<TransferCharacterData>;
|
||||
friend struct std::pair<std::string, TransferCharacterData>;
|
||||
friend void Archive::get(Archive::ReadIterator & source, TransferCharacterData & target);
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wundefined-var-template"
|
||||
|
||||
#ifndef _INCLUDED_DataResourceList_H
|
||||
#define _INCLUDED_DataResourceList_H
|
||||
|
||||
@@ -419,5 +422,5 @@ void DataResourceList<T>::garbageCollect ()
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
#pragma clang diagnostic pop
|
||||
#endif // _INCLUDED_DataResourceList_H
|
||||
|
||||
Reference in New Issue
Block a user