diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/common/Debugging/Errors.cpp | 7 | ||||
-rw-r--r-- | src/common/Debugging/Errors.h | 2 | ||||
-rw-r--r-- | src/server/bnetserver/Main.cpp | 2 | ||||
-rw-r--r-- | src/server/game/Server/Protocol/Opcodes.cpp | 2 | ||||
-rw-r--r-- | src/server/worldserver/Main.cpp | 2 |
5 files changed, 14 insertions, 1 deletions
diff --git a/src/common/Debugging/Errors.cpp b/src/common/Debugging/Errors.cpp index 04624147e1b..6157cd786cd 100644 --- a/src/common/Debugging/Errors.cpp +++ b/src/common/Debugging/Errors.cpp @@ -96,4 +96,11 @@ void Abort(char const* file, int line, char const* function) exit(1); } +void AbortHandler(int /*sigval*/) +{ + // nothing useful to log here, no way to pass args + *((volatile int*)NULL) = 0; + exit(1); +} + } // namespace Trinity diff --git a/src/common/Debugging/Errors.h b/src/common/Debugging/Errors.h index 38e311a6b13..37d247ada82 100644 --- a/src/common/Debugging/Errors.h +++ b/src/common/Debugging/Errors.h @@ -34,6 +34,8 @@ namespace Trinity void Warning(char const* file, int line, char const* function, char const* message); + DECLSPEC_NORETURN void AbortHandler(int sigval) ATTR_NORETURN; + } // namespace Trinity #if COMPILER == COMPILER_MICROSOFT diff --git a/src/server/bnetserver/Main.cpp b/src/server/bnetserver/Main.cpp index 740a0efa438..c367a1f7d40 100644 --- a/src/server/bnetserver/Main.cpp +++ b/src/server/bnetserver/Main.cpp @@ -85,6 +85,8 @@ LoginDatabaseWorkerPool LoginDatabase; int main(int argc, char** argv) { + signal(SIGABRT, &Trinity::AbortHandler); + std::string configFile = _TRINITY_BNET_CONFIG; std::string configService; auto vm = GetConsoleArguments(argc, argv, configFile, configService); diff --git a/src/server/game/Server/Protocol/Opcodes.cpp b/src/server/game/Server/Protocol/Opcodes.cpp index 5f189361d95..ff207de6a88 100644 --- a/src/server/game/Server/Protocol/Opcodes.cpp +++ b/src/server/game/Server/Protocol/Opcodes.cpp @@ -1429,7 +1429,7 @@ void OpcodeTable::Initialize() DEFINE_SERVER_OPCODE_HANDLER(SMSG_PET_GUIDS, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_PET_LEARNED_SPELLS, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_PET_MODE, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_PET_NAME_INVALID, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_PET_NAME_INVALID, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_PET_SLOT_UPDATED, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_PET_SPELLS_MESSAGE, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_PET_STABLE_LIST, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); diff --git a/src/server/worldserver/Main.cpp b/src/server/worldserver/Main.cpp index eed218ad7a4..906937e974b 100644 --- a/src/server/worldserver/Main.cpp +++ b/src/server/worldserver/Main.cpp @@ -101,6 +101,8 @@ variables_map GetConsoleArguments(int argc, char** argv, std::string& cfg_file, /// Launch the Trinity server extern int main(int argc, char** argv) { + signal(SIGABRT, &Trinity::AbortHandler); + std::string configFile = _TRINITY_CORE_CONFIG; std::string configService; |