Commit Graph

772 Commits

Author SHA1 Message Date
leak
f8e829da65 Removed useless SignalHandler class 2014-07-01 00:57:29 +02:00
leak
029bad6698 Replaced all remaining ACE based Singletons
Replaced ACE base AutoPtr class with shared_ptr
Note: worldserver currently broken due to MapUpdater threading failure (ACE ofc, what else could it be)
2014-07-01 00:54:09 +02:00
leak
d39a013b6b Replaced ACE_Task_Base based DatabaseWorker with PCQ
Note: Not exactly sure how shutdown should be handled, currently the queue clears itself out before shutting down
This might need to be changed if the queue should be fully processed before being deleted
2014-06-30 18:37:23 +02:00
leak
9588c1d92b Replace ACE thread/mutex in OpenSSLCrypto 2014-06-30 16:28:55 +02:00
leak
eb36acd152 Replaced ACE_Task_Base based LogWorker with ProducerConsumerQueue 2014-06-30 14:44:52 +02:00
leak
d8d0b4730e Revert "Removed ACE dependencies from LogWorker" This actually needs way more work
This reverts commit 0a592dd9db.
2014-06-24 21:10:07 +02:00
Subv
f03d49705d Core/Databases: Removed ACE dependencies on some of the database handling code. 2014-06-24 13:17:41 -05:00
leak
0a592dd9db Removed ACE dependencies from LogWorker 2014-06-24 19:13:29 +02:00
Subv
393b7eef53 Merge branch 'master' of github.com:TrinityCore/TrinityCore into boost 2014-06-24 10:32:34 -05:00
Shauren
05ea2f76b8 Core/Misc: Fixed warnings 2014-06-24 02:01:40 +02:00
Subv
0db743c4ff Merge branch 'master' of github.com:TrinityCore/TrinityCore into boost
Conflicts:
	src/server/authserver/Server/AuthSession.cpp
	src/server/game/Server/WorldSession.h
	src/server/shared/Packets/ByteBuffer.cpp
	src/server/shared/Utilities/Util.h
2014-06-23 16:35:54 -05:00
Aokromes
84e6af26e6 Merge pull request #11976 from Ascathor/master
Core/Misc: New ability to log account IP access history
2014-06-23 22:48:35 +02:00
leak
28b61812cf Fix non-PCH build 2014-06-23 21:02:13 +02:00
Subv
f9a08ac1c9 Core/Dependencies: Remove ACE_Singleton dependency from the Log and DelayExecutor classes.
Removed an unused function.
2014-06-22 14:07:23 -05:00
Subv
79440b3d9d Shared/Misc: Removed some more ACE dependencies 2014-06-22 13:17:47 -05:00
leak
bfcbde1c97 Various cleanups and fixes due to feedback 2014-06-22 16:29:49 +02:00
leak
ca3327dbed Replaced ACE_Configuration_Heap based config file handling with boost::property_tree::ini_parser 2014-06-22 15:45:54 +02:00
leak
7dd6f0f1d8 Replaced all ACE_OS::localtime_r calls 2014-06-22 15:42:46 +02:00
leak
ccf3374e49 Removed ACE dependies from ByteBuffer 2014-06-21 20:21:33 +02:00
leak
0df19b9087 Replaced ACE_Auto_Array_Ptr 2014-06-21 20:19:55 +02:00
leak
33dc72a812 Replaced Threading and SFMT access related code with std::thread and boost TSS
Note: The remote access thread is currently broken due to unknown ACE fail (will be replaced at some point anyways..)
2014-06-21 19:39:16 +02:00
Vincent-Michael
6332eaee9f Core: Kill again whitespace :/ 2014-06-15 19:43:10 +02:00
jackpoz
4688676f3e Shared/Misc: Improve Windows crash report
Improve WheatyExceptionReport Windows crash report to write a cleaner and more readable crash report, in particular:
- Fix missing variable Type in some cases
- Fix missing variable Name in some cases
- Properly format each member to avoid confusion when reading the log
- Add support for double pointers, e.g. Type**
- Add initial support for arrays, logging the number of elements and the first 10 elements for now. UDT members of array elements are not supported yet
- Skip static members, SymTagVTable and other not needed types
- Skip SymTagUDT with no children
- Fix possible stack overflows when logging strings/char*/char[] values.
- Fix "punting on symbol" error happening when trying to dereference bad pointers.
- Fix <user defined> type being logged instead of the correct type when reaching WER_MAX_NESTING_LEVEL or with pointer types with invalid addresses.
2014-06-15 18:46:20 +02:00
Ascathor
6949735098 Core/Misc:
* Fix some codestyle, fix some typos

* Change CMakeLists for: Custom (can be uncommented), Events, World
** Custom is theoretically unchanged. You can, however, uncomment the glob_recurse that initializes every file within. This might be easier for beginners.

* Introducing the IP Based Action Log System:
** On several different actions, e.g. Login, Character Login, etc., a new entry is added
** Can be logged on and off in worldserver config
*** Disabled by default to prevent increased log db size for unknowing users.

* Add a new row to account table called 'last_attempt_ip'
** Lists the last ip trying to connect to the account

* Add a new type of HookScripts: AccountScript
** Includes: OnAccountLogin, OnFailedAccountLogin, OnEmailChange, OnFailedChange, OnPasswordChange, OnFailedPasswordChange

* Added new Hook to PlayerScripts: OnFailedPlayerDelete

* Added new variables to PlayerScripts: OnPlayerDelete
2014-06-13 16:25:11 +02:00
Shauren
e55555ed8c Fixed windows nopch build 2014-06-11 23:08:32 +02:00
leak
55dee85ed8 Remove ace/config-all.h and ancient WinXP defines which are actually commented out... 2014-06-08 23:28:01 +02:00
leak
daa5c0ad0d Use correct define for endianess 2014-06-08 23:25:40 +02:00
leak
0dd10269d1 Replaced dependencies on ace/OS_NS_time.h 2014-06-08 20:08:43 +02:00
leak
fdd5e11a15 Fix for LockedQueue.h (clean rebuilds ftw.) 2014-06-08 16:05:23 +02:00
leak
ee4a3b9d59 Replaced mutex related code in Common.h 2014-06-08 15:30:57 +02:00
Vincent-Michael
1d39db16b9 Core/Misc: Kill Whitespace ... 2014-06-07 23:58:08 +02:00
Aokromes
4ec84fd1ec Core/Database: Update log for incorrect db structure 2014-06-07 22:13:42 +02:00
Vincent-Michael
2cd0dce366 Core: Fix non pch build 2014-06-07 00:30:08 +02:00
Trisjdc
eae18d8ed0 Core/Utils: Move EventMap to Util.h 2014-06-06 11:14:32 +01:00
leak
0fa3a4923e Replaced LockedQueue ACE lock with std::mutex 2014-06-02 23:01:01 +02:00
leak
68e22ad311 Replaced ACE based typedefs for fixed width ints with C++11 versions 2014-06-01 20:55:31 +02:00
Shauren
9fcd607e78 Core/Misc: Added utility method for checking is two sorted containers have a common element 2014-06-01 19:20:49 +02:00
jackpoz
6a54ed88c6 Core/NetworkIO: Fix performance loss when handling bad packets
Revert f9cb4280bd which retrieved the callstack each time a ByteBufferPositionException or a ByteBufferSourceException occurred, for example with bad packet structure.
2014-06-01 00:29:33 +02:00
jackpoz
b4327bfc69 Core/Misc: Fix no-pch build 2014-05-25 15:48:06 +02:00
jackpoz
5e66253de2 Core/Misc: Throw an exception if client sends invalid float/double data
Throw a ByteBufferException if client sends 1.#INF0000, 1.#QNAN000, 1.#IND0000 or other invalid float/double values.
Handle this invalid values in StaticMapTree::isInLineOfSight() to avoid triggering an assert.
Fixes #12126
2014-05-25 15:18:55 +02:00
jackpoz
7228bd3664 Revert "Core/Logging: Use logger cache for speed up logger filter search"
This reverts commit 39331ea7b9.
This is required to fix a race condition introduced with the logger cache. Adding a locking mechanism might make worthless the speed gain added by the cache itself, push a proper thread-safe implementation if it's worth it.

Helgrind log:
Possible data race during write of size 8 at 0x736F428 by thread #1
Locks held: none
   at 0x11872DF: std::_Hashtable<std::string, std::pair<std::string const, Logger const*>, std::allocator<std::pair<std::string const, Logger const*> >, std::__detail::_Select1st, std::equal_to<std::string>, std::hash<std::string>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true> >::_M_insert_bucket_begin(unsigned long, std::__detail::_Hash_node<std::pair<std::string const, Logger const*>, true>*) (hashtable.h:1196)
   by 0x11865A1: std::_Hashtable<std::string, std::pair<std::string const, Logger const*>, std::allocator<std::pair<std::string const, Logger const*> >, std::__detail::_Select1st, std::equal_to<std::string>, std::hash<std::string>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true> >::_M_insert_unique_node(unsigned long, unsigned long, std::__detail::_Hash_node<std::pair<std::string const, Logger const*>, true>*) (hashtable.h:1342)
   by 0x1185A48: std::__detail::_Map_base<std::string, std::pair<std::string const, Logger const*>, std::allocator<std::pair<std::string const, Logger const*> >, std::__detail::_Select1st, std::equal_to<std::string>, std::hash<std::string>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true>, true>::operator[](std::string const&) (hashtable_policy.h:496)
   by 0x1184F3A: std::unordered_map<std::string, Logger const*, std::hash<std::string>, std::equal_to<std::string>, std::allocator<std::pair<std::string const, Logger const*> > >::operator[](std::string const&) (unordered_map.h:596)
   by 0x1184495: Log::GetLoggerByType(std::string const&) (Log.h:106)
   by 0x1184527: Log::ShouldLog(std::string const&, LogLevel) (Log.h:112)
   by 0x16E7121: World::LoadConfigSettings(bool) (World.cpp:909)
   by 0x16EB623: World::SetInitialWorldSettings() (World.cpp:1276)
   by 0x118F0EC: Master::Run() (Master.cpp:169)
   by 0x1196AFF: main (Main.cpp:142)

This conflicts with a previous read of size 8 by thread #3
Locks held: none
   at 0x1186EA6: std::_Hashtable<std::string, std::pair<std::string const, Logger const*>, std::allocator<std::pair<std::string const, Logger const*> >, std::__detail::_Select1st, std::equal_to<std::string>, std::hash<std::string>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true> >::_M_find_before_node(unsigned long, std::string const&, unsigned long) const (hashtable.h:1162)
   by 0x1186263: std::_Hashtable<std::string, std::pair<std::string const, Logger const*>, std::allocator<std::pair<std::string const, Logger const*> >, std::__detail::_Select1st, std::equal_to<std::string>, std::hash<std::string>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true> >::_M_find_node(unsigned long, std::string const&, unsigned long) const (hashtable.h:604)
   by 0x11857B9: std::_Hashtable<std::string, std::pair<std::string const, Logger const*>, std::allocator<std::pair<std::string const, Logger const*> >, std::__detail::_Select1st, std::equal_to<std::string>, std::hash<std::string>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true> >::find(std::string const&) (hashtable.h:1025)
   by 0x1184DE2: std::unordered_map<std::string, Logger const*, std::hash<std::string>, std::equal_to<std::string>, std::allocator<std::pair<std::string const, Logger const*> > >::find(std::string const&) (unordered_map.h:543)
   by 0x11842EF: Log::GetLoggerByType(std::string const&) (Log.h:84)
   by 0x1184527: Log::ShouldLog(std::string const&, LogLevel) (Log.h:112)
   by 0x189AACA: MySQLConnection::Execute(char const*) (MySQLConnection.cpp:175)
   by 0x18A3225: BasicStatementTask::Execute() (AdhocStatement.cpp:56)

Address 0x736F428 is 120 bytes inside a block of size 184 alloc'd
   at 0x4C2AE3A: operator new(unsigned long, std::nothrow_t const&) (vg_replace_malloc.c:350)
   by 0x1185046: ACE_Singleton<Log, ACE_Thread_Mutex>::instance() (Singleton.cpp:91)
   by 0x11968E2: main (Main.cpp:135)
2014-05-18 16:53:29 +02:00
jackpoz
0904858624 Revert "Core/Logging: store loggers in cache correctly"
This reverts commit c6a4d5a1de.
2014-05-18 16:04:59 +02:00
jackpoz
5e86dea0b0 Shared/Packets: Handle crash by throwing an exception instead
Throw a ByteBufferException when trying to access the first element of an empty ByteBuffer class
2014-05-18 00:51:40 +02:00
jackpoz
03f16d2e90 Shared/Database: Increase Database Worker Pool queue size
Increase DatabaseWorkerPool queue size from the default 16KB to 8MB to avoid blocking the caller thread when queuing an async statement/transaction.
2014-05-17 23:48:32 +02:00
Dehravor
cbd36d5a4e Core/Misc: Remove remaining COMPILER_HAS_CPP11_SUPPORT related macros 2014-05-01 11:19:32 +02:00
Dehravor
24ae6a6802 Core/Misc: Remove obsolete C++11 backward compatibility macros
OVERRIDE, FINAL, DELETE_MEMBER
2014-04-29 16:35:11 +02:00
Kinzcool
c536305e3a Core: Droped faction_H field -- only one faction table is necessary 2014-04-27 18:13:55 -04:00
joschiwald
742f32f15a Core/Texts: Implemented loading BroadcastTexts 2014-04-22 17:57:23 +02:00
Shauren
0f5632c70e Core/Misc: Fixed some -Weffc++ warnings 2014-04-20 16:48:35 +02:00
jackpoz
37e6a3e1d2 Core/CrashHandler: Log GetLastError() id if no description is found
Log the System Error id returned by GetLastError() in case FormatMessage() doesn't find a proper description for that message.
2014-04-08 22:01:56 +02:00