aboutsummaryrefslogtreecommitdiff
path: root/src/server/shared
AgeCommit message (Collapse)Author
2014-05-01Core/Misc: Remove remaining COMPILER_HAS_CPP11_SUPPORT related macrosDehravor
2014-04-29Core/Misc: Remove obsolete C++11 backward compatibility macrosDehravor
OVERRIDE, FINAL, DELETE_MEMBER
2014-04-27Core: Droped `faction_H` field -- only one faction table is necessaryKinzcool
2014-04-22Core/Texts: Implemented loading BroadcastTextsjoschiwald
2014-04-20Core/Misc: Fixed some -Weffc++ warningsShauren
2014-04-08Core/CrashHandler: Log GetLastError() id if no description is foundjackpoz
Log the System Error id returned by GetLastError() in case FormatMessage() doesn't find a proper description for that message.
2014-04-08Core/Logging: store loggers in cache correctlyjoschiwald
2014-04-05Core/CrashHandler: Add more informations about localsjackpoz
Handle BasicType btChar and custom type std::basic_string<char,std::char_traits<char>,std::allocator<char> > (std::string). This allows WheatyExceptionReport to log the text stored in char*, char[] and std::string.
2014-03-29Merge pull request #11719 from Dehravor/master-lootShauren
Core/Loot: Fix master loot
2014-03-24Core/Logging: Fixed filenames of backup logsShauren
Closes #11765
2014-03-23Core/Misc: Removed unused defines, added missing include and removed a few ↵Shauren
warnings
2014-03-23Fixed build without PCHShauren
2014-03-22Core/Misc: Fix some static analysis issuesjackpoz
Fix some static analysis issues about: - uninitialized values, most of which are false positives, always initialized before being accessed - unchecked return values - dead code never executed - bad formatting leading to wrong behavior Please ensure EventMap is never used with event id set to 0 or those events will never execute.
2014-03-16Core/Loot: Implement round robin for under threshold items in case of master ↵Dehravor
loot Thanks @Shauren for pointing out
2014-03-02Core/Player: delete queststatus (weekly/monthly/seasonal) on deleting ↵joschiwald
character thx @Expecto - also rename some prepared statements Closes #11658
2014-02-08Shared/Logs: Code cleanupjackpoz
Remove unneeded check added in 89af6097f37587e178ac412252326351ca655075
2014-02-07Shared/Logs: Make AppenderFile more thread-safejackpoz
In case of dynamic file names don't store the FILE* handle in a shared class variable but keep it only at function scope. Valgrind log: at _IO_un_link (genops.c:69) by fclose@@GLIBC_2.2.5 (iofclose.c:55) by AppenderFile::CloseFile() (AppenderFile.cpp:94) by AppenderFile::_write(LogMessage const&) (AppenderFile.cpp:66) by Appender::write(LogMessage&) (Appender.cpp:102) by Logger::write(LogMessage&) const (Logger.cpp:63) by Log::write(LogMessage*) (Log.cpp:279) by Log::vlog(std::string const&, LogLevel, char const*, __va_list_tag*) (Log.cpp:267) by Log::outMessage(std::string const&, LogLevel, char const*, ...) (Log.h:129) Address 0x2a1bd2d0 is 0 bytes inside a block of size 568 free'd at free (vg_replace_malloc.c:468) by fclose@@GLIBC_2.2.5 (iofclose.c:85) by AppenderFile::CloseFile() (AppenderFile.cpp:94) by AppenderFile::_write(LogMessage const&) (AppenderFile.cpp:66) by Appender::write(LogMessage&) (Appender.cpp:102) by Logger::write(LogMessage&) const (Logger.cpp:63) by Log::write(LogMessage*) (Log.cpp:279) by Log::vlog(std::string const&, LogLevel, char const*, __va_list_tag*) (Log.cpp:267) by Log::outMessage(std::string const&, LogLevel, char const*, ...) (Log.h:129)
2014-02-07Shared/Logs: Add workaround for "w" flag used with dynamic name filesjackpoz
Ignore "w" flag and always use "a" for log files with dynamic name since the file handle is created at every log line and "w" would delete any other logged line from previous _write() calls. The best solution would be to overwrite only at first call and append at any other call.
2014-02-06Core/CrashHandler: Add more informations about localsjackpoz
Handle SymTagData with inner type of SymTagPointerType. Increase buffer sizes to avoid buffer overflows. Avoid infinite loops by logging the children of each type only once. Avoid too deep nesting by adding a max nesting level. Print the address for arrays instead of just the name.
2014-01-31Build: Use override/final keywords for VS 2012 and newer. (VS 2013 still ↵Shauren
defines __cplusplus as 199711L)
2014-01-31Shared/Logs: Fix crash in Console log outputjackpoz
Correctly handle the return value of vsnprintf() which returns -1 if the buffer is too small http://msdn.microsoft.com/en-us/library/1kt27hek.aspx . In this case just truncate the output. This caused a crash on character delete if Logger.entities.player.dump was enabled and set to 3. Fixes #11539
2014-01-30Fix warnings introduced on littleendian in ↵QAston
2134cb610d45727a0623741f7416a360882133fa This fix prevents possible issues on bigendian machines. Don't use c style casts ppl, it's evul.
2014-01-23Core/CrashHandler: Add more informations about localsjackpoz
Log "NULL" for NULL pointers. Log the correct type instead of <user defined> for pointers and log its fields recursively. Log locals of all threads. Log the address if retrieving the value threw an exception. Increase buffer sizes to avoid buffer overflows.
2014-01-22Shared/OpenSSLCrypto: Add switch to fix build under MacGacko
2014-01-19CoreCore/CrashHandler: Handle CRT asserts in Windows buildjackpoz
Handle CRT asserts in Windows crash handler instead of popping up a Abort/Retry/Ignore window
2014-01-19Core/CrashHandler: Fix issues on Windows crash handlerjackpoz
Fix few issues on WheatyExceptionReport: - fix NULL dereference exception in GetLogicalAddress() when TC assert in triggered ( *((volatile int*)NULL) = 0; ) - fix infinite loop in DumpTypeIndex() when dumping std types like std::string - fix FormatSymbolValue() pointing to wrong address when accessing local variable values - use portable types instead of x86 specific types, this fixes some wrong address issues on x86 platform - use bigger buffers to format symbols to avoid buffer overflows
2014-01-12Core/Movement: Add LOS check for fleeingmovement target point.zengwf
Prevents fleeing or feared units from going to upper floor ignoring walls/ceilings with mmaps on(and usually get stucked). Current implementation just randomly selects a distance and angle against the frighting unit, when in narrow circumstance such as underground caves, such targeting point would be at another floor. Closes #11300 Ref #9475 (needs fixed confirmation)
2014-01-01Update copyright note for 2014.Vincent_Michael
Happy new year.
2013-12-25Core/Scripting: Replace casted with cast as casted is not a word.Malcrom
2013-12-22Core/Auth: Fix expiring account bansjackpoz
Fix a database race condition in authserver that would delay the account ban expiry by 1 login because the query that would have removed the ban was executed asynchronously.
2013-12-19Core/Logging: Use logger cache for speed up logger filter searchSpp
2013-12-14Core/Misc: Fix some static analysis issuesjackpoz
Fix some static analysis issues about uninitialized values. Most of them are false positives, always initialized before being accessed, while some of them are real issues spotted by valgrind too.
2013-12-01Core/Misc: Fix some static analysis issuesjackpoz
Fix some static analysis issues, mostly false positive about fields not initialized in the constructor. It's good practice anyway to always initialize them.
2013-11-25Core/Guilds: Fixed an issue with withdrawing money from guild bank as guild ↵Shauren
master if the guild was created using a gm command Closes #11262
2013-11-17Core/Transports: Fix few transport issues on relog.jackpoz
Properly save transport related data to database when saving a Player . On Player login update the current position as relative to transport, in case the transport moved.
2013-11-16Core/Auth: Fix Auth failing sometimesjackpoz
Fix a database race condition between authserver saving session key to database asynchronously and worldserver reading it; session key is now saved synchronously.
2013-11-11Core/Logging: Minor changesSpp
- Select stderr when writing ERROR and FATAL messages - Simplify function defines - Fix `logs` table structure with latest logging changes
2013-11-08Core/Logging: Remove LOG_FILTER_XXX defines with it's value (remember logger ↵Spp
names are case-sensitive)
2013-11-08Core/Logs: Create default set of loggers and Appender if the config is wrong.Spp
- Logger root (Error) - Logger server (Info) - Appender Console Logger names are case-sensitive, Appender names are not.
2013-11-07Core/Logging: Extend logging system to allow inheritance of loggersSpp
- Changed default loggers and appenders - '.' determines the relation between loggers ("type.subtype" inherits "type" logger setting if logger "type.subtype" is not defined) - When core logs a message it search for the correct logger (root is the default one) ie: a message logged with "type.subtype" * Core will try to find a logger with name "type.subtype", if its not found then will search for "type", again if its not found it will return the default one "root"
2013-11-02Core/Database: Add additional assertjackpoz
Add additional assert to assure that helgrind reports related to SQLQueryHolderTask::Execute() and WorldSession::ProcessQueryCallbacks() are false positives. The only chance for WorldSession::ProcessQueryCallbacks() to access the SQL queries before they are completed is if m_result.ready() is true before the end of SQLQueryHolderTask::Execute() . Helgrind false positive log: Possible data race during read of size 8 at 0x2BD641E0 by thread #7 Locks held: none at : SQLQueryHolder::GetPreparedResult(unsigned long) (QueryHolder.cpp:107) by : Player::LoadFromDB(unsigned int, SQLQueryHolder*) (Player.cpp:16917) by : WorldSession::HandlePlayerLogin(LoginQueryHolder*) (CharacterHandler.cpp:807) by : WorldSession::ProcessQueryCallbacks() (WorldSession.cpp:1112) by : WorldSession::Update(unsigned int, PacketFilter&) (WorldSession.cpp:401) by : World::UpdateSessions(unsigned int) (World.cpp:2646) by : World::Update(unsigned int) (World.cpp:2003) by : WorldRunnable::run() (WorldRunnable.cpp:60) by : ACE_Based::Thread::ThreadTask(void*) (Threading.cpp:186) by : ACE_OS_Thread_Adapter::invoke() (in /usr/lib/libACE-6.0.3.so) by : mythread_wrapper (hg_intercepts.c:233) by : start_thread (pthread_create.c:311) This conflicts with a previous write of size 8 by thread #4 Locks held: none at : SQLQueryHolder::SetPreparedResult(unsigned long, PreparedResultSet*) (QueryHolder.cpp:140) by : SQLQueryHolderTask::Execute() (QueryHolder.cpp:196) by : SQLOperation::call() (SQLOperation.h:65) by : DatabaseWorker::svc() (DatabaseWorker.cpp:45) by : ACE_Task_Base::svc_run(void*) (in /usr/lib/libACE-6.0.3.so) by : ACE_Thread_Adapter::invoke_i() (in /usr/lib/libACE-6.0.3.so) by : ACE_Thread_Adapter::invoke() (in /usr/lib/libACE-6.0.3.so) by : mythread_wrapper (hg_intercepts.c:233) Address 0x2BD641E0 is 16 bytes inside a block of size 792 alloc'd at : operator new(unsigned long) (vg_replace_malloc.c:319) by : __gnu_cxx::new_allocator<std::pair<SQLElementData, SQLResultSetUnion> >::allocate(unsigned long, void const*) (new_allocator.h:104) by : std::_Vector_base<std::pair<SQLElementData, SQLResultSetUnion>, std::allocator<std::pair<SQLElementData, SQLResultSetUnion> > >::_M_allocate(unsigned long) (in /home/jackpoz/trinity/bin/worldserver) by : std::vector<std::pair<SQLElementData, SQLResultSetUnion>, std::allocator<std::pair<SQLElementData, SQLResultSetUnion> > >::_M_fill_insert(__gnu_cxx::__normal_iterator<std::pair<SQLElementData, SQLResultSetUnion>*, std::vector<std::pair<SQLElementData, SQLResultSetUnion>, std::allocator<std::pair<SQLElementData, SQLResultSetUnion> > > >, unsigned long, std::pair<SQLElementData, SQLResultSetUnion> const&) (vector.tcc:483) by : std::vector<std::pair<SQLElementData, SQLResultSetUnion>, std::allocator<std::pair<SQLElementData, SQLResultSetUnion> > >::insert(__gnu_cxx::__normal_iterator<std::pair<SQLElementData, SQLResultSetUnion>*, std::vector<std::pair<SQLElementData, SQLResultSetUnion>, std::allocator<std::pair<SQLElementData, SQLResultSetUnion> > > >, unsigned long, std::pair<SQLElementData, SQLResultSetUnion> const&) (stl_vector.h:1024) by : std::vector<std::pair<SQLElementData, SQLResultSetUnion>, std::allocator<std::pair<SQLElementData, SQLResultSetUnion> > >::resize(unsigned long, std::pair<SQLElementData, SQLResultSetUnion>) (stl_vector.h:707) by : SQLQueryHolder::SetSize(unsigned long) (QueryHolder.cpp:167) by : LoginQueryHolder::Initialize() (CharacterHandler.cpp:66) by : WorldSession::HandlePlayerLoginOpcode(WorldPacket&) (CharacterHandler.cpp:788) by : WorldSession::Update(unsigned int, PacketFilter&) (WorldSession.cpp:363) by : World::UpdateSessions(unsigned int) (World.cpp:2646) by : World::Update(unsigned int) (World.cpp:2003)
2013-10-28Core/Code: Unify [more] codestyle for brackets: )\n{\n} to ) { }.leguybrush
2013-10-27Core/Code: Unify codestyle for brackets: {} to { }.Ascathor
Also added missing copyright to some files.
2013-10-17Core/Creatures: Removed remains of creature_transport tableShauren
2013-10-01Whitespace between string literals and user-defined literals is now ↵Ellie
mandatory for concatenation in C++11
2013-09-29Core/RBAC: Simplify RBAC implementationSpp
- Drop groups (roles than can have inherited roles) and roles (set of permissions) - Permissions can now have inherited permissions (those act as roles) RBAC DB structure is now limited to four tables - rbac_permissions: Contains permissions and roles - rbac_linked_permissions: Contains the relation between permissions and linked permissions (those permissions that have linked permissions are called roles) - rbac_default_permissions: Contains the list of permissions to be granted to each security level [Added to maintain compatibility in an easy way] - rbac_account_permissions: Contains the list of permissions granted or denied for a particular account. NOTE: IF YOU ARE USING CUSTOM PERMISSIONS, ROLES OR GROUPS CHECK THE SQL BEFORE APPLYING...
2013-09-21Core/DB: Make a26a24a consistent with Trinity code stylejackpoz
Change DatabaseWorkerPool<T>::DirectExecute() to handle PreparedStatement disposal in the same way of DatabaseWorkerPool<T>::Query() , thanks Joschiwald for patch.
2013-09-20Merge pull request #10827 from jackpoz/restore_warningsraczman
Shared/Build: Restore disabled warnings on Visual Studio
2013-09-18Core: Fix non pch buildVincent-Michael
2013-09-18Core/Achievements: Implemented ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE_TYPEjoschiwald