Commit Graph

51 Commits

Author SHA1 Message Date
DDuarte
0afcefea27 Core/Config: Fix 3 more missing config warnings
Closes #16861

Thanks tkrokli
2016-03-31 03:31:21 +01:00
DDuarte
9431b94bff Core/Config: Error logging for ptree_bad_data
Ref 6487e2f2d6 (commitcomment-16888976)
2016-03-31 03:19:27 +01:00
DDuarte
06b3bca0d2 Core/Startup: Warn when a config key isn't found in the config files
Example: "Missing name Guild.SaveInterval in config file worldserver.conf, add "Guild.SaveInterval = 15" to this file"
2016-03-27 23:48:17 +01:00
Shauren
a81a204678 Core/Common: Moved MessageBuffer to common 2016-03-26 17:15:20 +01:00
Naios
501fd9b502 Core/Common: Converted the common library to a shared library.
* There is still the possibility to static link against common.
2016-03-24 01:28:58 +01:00
Naios
f4e0945b13 Core/Build: Add the possibility to link libraries dynamically.
* makes it possible to access exported singletons from other shared lib's.
* reduces binary size
2016-03-24 01:28:55 +01:00
Shauren
e3af42e05c Core/Util: Extracted GetPID to separate function 2016-03-21 17:25:34 +01:00
Naios
0db4f018e8 CMake: Use inherited dependencies in common and tools
(cherry picked from commit abda7a910a)
2016-03-19 23:19:52 +01:00
Shauren
680c12a4bf Core/Crypto: Renamed SHA1Randx/WardenKeyGeneration and made it a template class 2016-03-19 23:15:54 +01:00
Naios
37dbbe22eb Dep/CppFormat: Update cppformat to cppformat/cppformat@5174b8c
(cherry picked from commit f52495c66b)
2016-03-16 16:12:04 +01:00
Naios
30517cb1d3 Core/Common: Generalize platform specific includes in common/Platform 2016-03-11 18:25:55 +01:00
Naios
5c91586797 Core/Common: Move singleton instances into compilation units
* Fixes issues when building shared libraries
  (prevents gcc and clang from providing several instance)
2016-03-11 18:22:39 +01:00
MitchesD
ce5def332f Core/Misc: fix build 2016-03-03 19:58:28 +01:00
Shauren
dea7d429ab Core/Debugging: Make abort() less bad on windows by forcing crash log generation 2016-03-03 17:29:48 +01:00
joschiwald
44ad10f884 Core/Logging: fixed default logger (partial reverts 0904858624)
(cherry picked from commit 9beeca79ac)
2016-02-27 18:00:02 +01:00
Shauren
a0b2be6c1d Core/Logging: Force synchronous logging after io_service shutdown - fixes logging on worldserver shutdown 2016-02-23 23:41:18 +01:00
Shauren
8086a39210 Core/PacketIO: Requeue packets handled with STATUS_LOGGEDIN received before player is fully loaded in one step after packet processing loop - reduces used locks from 3 per packet to 1 per packet 2016-02-22 20:02:26 +01:00
Naios
719159e207 Core/Common: Add a generic config helper to access built-in overwriteable paths.
* Adds CMAKE_COMMAND and CMAKE_BINARY_DIR to revision_data.h
* Move the source and mysql exe path handling out of the DBUpdater.
* Make some Config methods const for correctness.
* Remove C & CXX flags from revision_data.h
 (was unused and didn't capture all cxx vars)
* Reorder the link order to prevent `ld` from ignoring the file
* Ref #15671
2016-02-21 15:52:42 +01:00
Shauren
97a79af470 Core/Networking: Rewrite networking threading model
Each network thread has its own io_service - this means that all operations on a given socket except queueing packets run from a single thread, removing the need for locking
Sending packets now writes to a lockfree intermediate queue directly, encryption is applied in network thread if it was required at the time of sending the packet
2016-02-19 19:23:04 +01:00
Carbenium
32e8b6506f Collision/MMap: Fix a memleak reported by valgrind
Tiles which are owned by the mesh should have the DT_TILE_FREE_DATA flag to ensure
deallocation on removal from the mesh.

Log:
==23516== 6,181,976 bytes in 6 blocks are definitely lost in loss record 15 of 15
==23516==    at 0x4C298A0: operator new[](unsigned long) (vg_replace_malloc.c:389)
==23516==    by 0x2052660: dtCustomAlloc(int, dtAllocHint) (Memory.h:11)
==23516==    by 0x29D7FDA: dtAlloc(int, dtAllocHint) (DetourAlloc.cpp:43)
==23516==    by 0x230AA70: MMAP::MMapManager::loadMap(std::string const&, unsigned int, int, int) (MMapManager.cpp:166)
==23516==    by 0x1DD585B: Map::LoadMMap(int, int) (Map.cpp:125)
==23516==    by 0x1DD7266: Map::LoadMapAndVMap(int, int) (Map.cpp:200)
==23516==    by 0x1DD93C6: Map::EnsureGridCreated_i(CoordPair<64u> const&) (Map.cpp:453)
==23516==    by 0x1DD9129: Map::EnsureGridCreated(CoordPair<64u> const&) (Map.cpp:429)
==23516==    by 0x1DED100: Map::GetGrid(float, float) (Map.cpp:2200)
==23516==    by 0x1DE0F4C: Map::GetAreaFlag(float, float, float, bool*) const (Map.cpp:2349)
==23516==    by 0x198521B: Map::GetZoneId(float, float, float) const (Map.h:353)
==23516==    by 0x197CFF0: WorldObject::GetZoneId() const (Object.cpp:1277)

Phase tiles aren't managed by detour so they shouldn't be free'd automatically on removal.
See MMapManager::UnloadPhaseTile
2016-01-30 20:40:54 +01:00
Shauren
d5b0ffbe9b Core/Misc: Added safeguard against generating invalid selection weight data in Trinity::Containers::SelectRandomWeightedContainerElement 2016-01-23 11:34:47 +01:00
Shauren
bc94bacce4 Core/Misc: Build fix for clang & libc++ 2016-01-09 01:38:59 +01:00
DDuarte
ff9c999334 Core/Utilities: Fix build in some versions of Ubuntu / GCC
Closes #16125
2016-01-03 20:39:13 +00:00
Shauren
00c878e73a Core/Misc: Build fix for older gcc 2016-01-02 18:45:01 +01:00
Vincent-Michael
478cc756eb Update copyright note for 2016
Happy new year (Again new year with idiots ...)
2016-01-01 00:34:25 +01:00
Shauren
9ab10d6e68 Core/Misc: VS 2013 build fix - horrible hack. 2015-12-27 01:21:30 +01:00
Shauren
921d893c2a Build fix 2015-12-26 00:33:14 +01:00
Shauren
ae20b2ab56 Core/Utils: Moved rng functions to separate header and added utility functions to select a random element from a container where each element can have different chance of being selected 2015-12-24 19:48:39 +01:00
jackpoz
f6131af02b Merge pull request #15912 from Treeston/3.3.5-urandms
Core/Util: Add urandms(minMS, maxMS) helper
(cherry picked from commit c1b4cd21f3)
2015-12-12 03:26:31 +01:00
Zedron
32a82dc956 Core/MMaps: Fixed mmap loading
Bug introduced in 1d2aafd
2015-11-24 15:31:49 -06:00
Vincent-Michael
b5329d8a03 Core: Revert fail 2015-11-15 16:49:17 +01:00
Vincent-Michael
5d584116fe Core: Added missing overrides 2015-11-15 16:48:12 +01:00
Shauren
d31706b07e Core/DBLayer: Improve error message from 0a27f8bce2 2015-11-13 22:43:36 +01:00
Shauren
9fa938f3e0 Core/Conditions: Optimizations part 1 - use containers more suited for their role 2015-10-25 12:00:05 +01:00
Shauren
5e0cee85dd Core/Conditions: Type renaming 2015-10-25 10:59:58 +01:00
Shauren
82db416b5d Warning fixes 2015-10-17 16:35:37 +02:00
Naios
13654bac2c Core/Tools: Fix brutal linking in mmaps extractor.
* caused warnings with shared linking
* ref #15671
2015-10-17 13:14:20 +02:00
Shauren
4c866a0af0 Core/Crash reporting: Fixed windows version detection for 8.1 and newer 2015-10-16 00:50:49 +02:00
jackpoz
7005089241 Core/Misc: Fix issues reported by static analysis
Coverity defect IDs: 1316687, 1316688

(cherry picked from commit 51a2a3fa93)
2015-09-24 22:36:37 +02:00
Shauren
e6e5f5c559 Partially revert "Core/Build: Added missing abort() calls on error handlers"
This reverts commit 8ea17647e6.
2015-09-21 17:18:55 +02:00
StormBytePP
8ea17647e6 Core/Build: Added missing abort() calls on error handlers 2015-09-21 15:52:34 +02:00
StormBytePP
958fd013e7 Core/Build: Add Trinity::Abort definition in header file 2015-09-21 15:31:49 +02:00
StormBytePP
c1817dff37 Fix a typo 2015-09-21 15:21:09 +02:00
StormBytePP
0bed9d56cb Core: Added ABORT() macro to prevent the usage of ASSERT(false) as a quick hack to crash the core misusing assert 2015-09-21 15:17:05 +02:00
Shauren
89b902b4e0 Core/Misc: Added a few stl header includes to Common.h 2015-09-19 18:25:43 +02:00
Shauren
04de58c8d3 Core/Players: Changed multi-segment taxi paths to fly nearby
flight masters along the way, not directly through them

* Taxi cost on multi-segment paths is now charged per segment when it is started

Cherry-picked from commit 2056961aae (+fixes)
2015-09-13 17:23:37 +02:00
Shauren
65999801d3 Buildsystem: Added dependency on revision_data to common project. Simply including the header in GitRevision.cpp is not enough to rebuild that file after updating sources
Fixes having to build twice before GitRevision returns accurate info.
2015-09-06 11:13:24 +02:00
Shauren
b564c10b13 Core/Players: Implemented serverside validation of reserved/profane names
Closes #15357

New library dependency: Boost.Regex
2015-08-30 00:17:08 +02:00
Shauren
ec5700c2a2 Core/Misc: Fixed macro redefinition warnings when building for running under helgrind 2015-08-25 00:37:55 +02:00
StormBytePP
ba2e9fbe95 Core/BuildSystem: Merged crypto into common, cleaned include directory lists (to mimic 3.x buildsystem) 2015-08-24 03:35:19 +02:00