Commit Graph

847 Commits

Author SHA1 Message Date
Shauren
abfd29ab61 Core/WorldSession: Added research notes about CMSG_AUTH_SESSION values and reordered checks during login to always initialize encryption first to make sure the client can read failure packet 2014-08-21 18:18:13 +02:00
Shauren
7cb72c2aac Core/DBLayer: Fixed an incredibly rare memory leak happening when player started loading from database and never finished 2014-08-16 01:43:42 +02:00
Shauren
aab4ab166d Core/Socket: Added helpers to retrieve the size of currently ready data 2014-08-15 18:43:17 +02:00
joschiwald
ccfa82e7d5 Core/Creature: update creature_template and some other small things
http://www.trinitycore.org/f/topic/9572-creature-damage/
2014-08-14 16:09:14 +02:00
Shauren
bd4edf6e22 Core/Threading: Fixed possible race condition with m_timeOutTime and fixed Thread #1: pthread_cond_{signal,broadcast}: dubious: associated lock is not held by any thread in PCQ 2014-08-12 18:18:52 +02:00
Shauren
c741d2682a Core/NetworkIO: Prevent queueing more async operations when socket is already closed 2014-08-11 20:43:07 +02:00
leak
1a27ce1267 Core/NetworkIO: Restore networking related scripting hooks
Closes #12607
2014-08-11 17:40:43 +02:00
leak
528baae5f7 Kill potentially uninitialized variable warning 2014-08-11 14:03:16 +02:00
leak
14cb6e4235 Resolve shutdown crash/leak if MySQL server is not running
Fixes #12734
2014-08-10 22:43:48 +02:00
Vincent-Michael
9aea8046ce Core: Fix non pch build 2014-08-10 21:46:04 +02:00
Shauren
f5bf13295c Core/NetworkIO: Prevent double closing the same socket 2014-08-10 21:32:57 +02:00
Shauren
99e36e923f Core/Misc: Removed ACE leftovers 2014-08-10 12:09:26 +02:00
Shauren
df11916ad5 Core/NetworkIO: Allow receiving packets bigger than buffer size and properly handle situations where not entire packet was read in one go
Core/Authserver: Restored authenticator functionality
2014-08-10 11:00:27 +02:00
Vincent-Michael
0daebd9705 Core: Fix build for Intel Composer XE 2014-08-10 01:08:07 +02:00
DDuarte
df3b08d140 Core/Server: Use nullptr instead of 0 where pointers are expected 2014-08-09 21:32:26 +01:00
DDuarte
a394205eca Core/Server: Add missing overrides 2014-08-09 20:17:40 +01:00
Shauren
936db9d50d Core/NetworkIO: Handle exceptions thrown from socket constructor when retrieving remote address 2014-08-08 14:01:09 +02:00
Vincent-Michael
7c6e1b1505 Revert "Core: Fix build for vs2014"
This reverts commit e303451189.
2014-08-07 21:21:19 +02:00
Vincent-Michael
e303451189 Core: Fix build for vs2014 2014-08-07 20:41:33 +02:00
Duarte Duarte
ca368a781b Core/Socket: Fix typo in constructor
Using moved objects is generally a bad idea

Thanks @Daejiv

Closes #12800
2014-08-07 14:25:43 +01:00
Vincent-Michael
fad2bd4f92 Core: Kill AGAIN whitespace :( 2014-08-07 07:19:06 +02:00
Vincent-Michael
8c73b2dbae Core: Fix non pch build 2014-08-07 07:00:17 +02:00
leak
48b94c3beb Prevent reading address information from potentially closed socket 2014-08-06 23:16:40 +02:00
Shauren
7d97b4b841 Core/Misc: Fixed textlike/hexlike methods of ByteBuffer to print properly 2014-08-06 10:00:23 +02:00
Vincent-Michael
c8956ca6f2 Core: Fix build for shit OS
Closes #12597
2014-08-05 17:16:53 +02:00
DDuarte
cb453fa093 Core/Shared: Fix world and auth crash on shutdown (PCQ & DbWorker)
Fixes #12704
2014-08-02 19:30:55 +01:00
joschiwald
04bb78f6c3 Scripts/OutdoorPvP: replaced some chat texts with proper defense messages 2014-07-29 23:45:34 +02:00
DDuarte
0e52b111f3 Core/Config: User-friendlyfy configuration parsing errors
It will now print useful error messages that pinpoint the issue
with the config file (missing file, bad syntax, etc)

In memory of MitchesD that lost 18 hours finding a problem with
his config because of a duplicated line.
2014-07-29 01:47:00 +01:00
Shauren
833195062c Update Socket.h
Added missing typename keyword
2014-07-29 02:00:23 +02:00
Shauren
6418789489 Core/Socket: Fixed expected template evaluated type for AsyncWrite if PacketType is a pointer (Bla* const& is not what we want) 2014-07-29 01:52:28 +02:00
DDuarte
100fd82b2b Core/Networking: Attempt to fix some exceptions
Call the non-throwing versions of socket.remote_endpoint in GetRemoteIpAddress
and GetRemotePort. Sh*t will still be broken tho
2014-07-28 02:58:03 +01:00
leak
e502e01f5d Fixed a rare crash case when authserver socket was forcefully closed during read
Closes #12634
2014-07-27 18:36:03 +02:00
Shauren
6f272ea5b7 Core/Network: Optimized packet sending by removing unneccessary memory copying 2014-07-27 17:46:46 +02:00
Shauren
e77c0b6ed4 Core/Network: Allow storing any packet types in Socket write queue to reduce the amount of copying going on 2014-07-27 14:59:46 +02:00
Shauren
26715795b4 Fixed gcc build 2014-07-27 01:26:03 +02:00
Shauren
c1b1ba44ba Core/Network: Refactored socket code, moved common operations to base Socket class 2014-07-26 23:26:01 +02:00
Shauren
e1c400250c Added comments to 6961f957c9 to make sure noone decides that storing the result in a variable is unneccessary 2014-07-26 16:14:18 +02:00
Shauren
6961f957c9 Core/DBLayer: Fixed possible crashes with async queries retrieving result
Closes #12655
2014-07-26 16:10:05 +02:00
Subv
a03c879565 Core/PreparedStatements: Fixed a change I missed in the World prepared statements for waypoints. 2014-07-25 20:18:43 -05:00
Subv
b5d025938e Core/Waypoints: Allow the table waypoint_data to use Takeoff and Land waypoints. 2014-07-25 19:05:25 -05:00
DDuarte
0b75e38755 Core/Shared: Change rand32 to return uin32 instead of int32
Fixes a crash that happened when rand32 returned negative values.
Also updated some related comments that were outdated since we changed to SFMT.

Closes #12638
2014-07-25 15:00:40 +01:00
Shauren
b5f0b85b48 Core/Misc: Fixed a possible crash in ProducerConsumerQueue::Cancel 2014-07-24 18:05:54 +02:00
DDuarte
737c3aa9f6 Core/Common: Remove the no longer finite(x) macro for MSVC
Use std::isinfinite(f) instead.
2014-07-24 01:01:03 +01:00
Jared P. Jones
11ecd851a1 Core/Misc: Silenced 500 OS X Warnings and removed deprecated finite() method.
*Mac OS X fires off over 200 warnings related to gsoap about the deprecated register method. CMake has been patched to remove this warning.
*Updated all occurences of finite() to std::isfinite. The method finite() is not standardized by anyone aside from BSD. std::isfinite() however is standarized by C++
*Removed -ncurses and -pthread from OS X compilation. Now that we use Boost and C++11 there is no longer a need for pthread in OS X. All it does is throw a warning. However, ncurses isn't needed either as it's built into the OS X SDK and linked by default.

Note: There are only 5 remaining warnings left when compiling on OS X. I did not attempt to fix these as they were related to 3rd party libraries statically linked into the code. The 5 warnings left are all related to unused variables.
2014-07-23 17:30:45 -05:00
DDuarte
44c0d66d63 Core/Misc: Remove a define that is no longer needed since ACE was removed 2014-07-22 13:12:39 +01:00
leak
5b0898b33c Core/DatabaseWorkerPool: Delete PCQ in dtor rather than in Close() and cancel queue properly before doing so 2014-07-21 20:12:44 +02:00
Sebastian Valle Herrera
eae97c7bc8 Core/PreparedStatements: Fixed a Coverity warning 2014-07-21 13:01:11 -05:00
Vincent-Michael
946ab3e8b7 Core: Kill again whitespace :( 2014-07-21 18:14:22 +02:00
Shauren
c0eba6a127 Fixed gcc build without pch 2014-07-20 16:06:35 +02:00
Vincent-Michael
0531f52008 Core: Fix non pch build (gcc) 2014-07-20 02:54:12 +02:00