Commit Graph

86 Commits

Author SHA1 Message Date
leak
bfcbde1c97 Various cleanups and fixes due to feedback 2014-06-22 16:29:49 +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
leak
5a363ee0e1 Replace authserver ACE related code with Boost/C++11 2014-05-30 14:54:56 +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
Gacko
1b2e4d8110 Remove whitespaces from previous commit 2014-02-05 17:49:04 +01:00
Gacko
d0c9970be0 Authserver / Worldserver: Fix warnings about unused variables 2014-02-05 17:33:28 +01:00
zengwf
23acf75d3b Core/Movement: Add LOS check for fleeingmovement target point.
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-12 00:33:33 +00:00
Vincent_Michael
20004050bc Update copyright note for 2014.
Happy new year.
2014-01-01 00:07:53 +01:00
jackpoz
2a7f03039d Core/Misc: Fix warnings
Fix warnings appearing with -Wstrict-aliasing flag.
2013-12-28 17:24:43 +01:00
jackpoz
04cc51a6cf Core/Misc: Fix some static analysis issues
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-12-01 16:19:30 +01:00
Spp
94e2b9332a Core/Logging: Remove LOG_FILTER_XXX defines with it's value (remember logger names are case-sensitive) 2013-11-08 10:50:51 +01:00
jackpoz
e1e1067d17 Core/Thread: Fix race condition in FreezeDetectorRunnable
Fix race condition by replacing a static volatile uint32 with proper atomic thread-safe ACE_Atomic_Op<ACE_Thread_Mutex, uint32>, incremented in WorldRunnable::run() at each world loop and read in FreezeDetectorRunnable::run().

Helgrind log:
 Possible data race during read of size 4 at 0x2400D54 by thread #12
 Locks held: none
    at 0x100FEA6: FreezeDetectorRunnable::run() (Master.cpp:106)
    by 0x1637892: ACE_Based::Thread::ThreadTask(void*) (Threading.cpp:186)
    by 0x518F555: ACE_OS_Thread_Adapter::invoke() (OS_Thread_Adapter.cpp:103)
    by 0x4C2B5AD: mythread_wrapper (hg_intercepts.c:219)
    by 0x61DAB4F: start_thread (pthread_create.c:304)
    by 0x6C69A7C: clone (clone.S:112)

 This conflicts with a previous write of size 4 by thread #9
 Locks held: none
    at 0x100C23E: WorldRunnable::run() (WorldRunnable.cpp:55)
    by 0x1637892: ACE_Based::Thread::ThreadTask(void*) (Threading.cpp:186)
    by 0x518F555: ACE_OS_Thread_Adapter::invoke() (OS_Thread_Adapter.cpp:103)
    by 0x4C2B5AD: mythread_wrapper (hg_intercepts.c:219)
    by 0x61DAB4F: start_thread (pthread_create.c:304)
    by 0x6C69A7C: clone (clone.S:112)
2013-09-01 18:49:49 +02:00
QAston
19343ddd55 Fix crashed caused by using openssl from multiple threads simultanously.
Note that this doesn't make BigNumber class threadsafe - it never was that way.
2013-08-18 17:44:04 +02:00
Nay
1bb3c4a2b4 Misc: Fix warnings and build
Closes #10396
2013-07-29 14:24:53 +01:00
Nay
3330239a02 Servers: Fix typo 2013-07-28 20:12:06 +01:00
Nay
e3f7be12ef Servers: Enable UseProcessors and ProcessPriority settings to be used on Linux 2013-07-28 18:58:12 +01:00
Nay
f71d894a21 Servers: Fix some code style issues in world and authserver 2013-07-28 16:59:07 +01:00
Shauren
779a59e7e2 Core/Config: Refactored ConfigMgr
* Loading initial configuration files is now separate from loading any additional custom configs
2013-07-15 17:31:44 +02:00
Spp
d1677b2db0 Core/Logging: Performance-related tweaks to logging system
All sLog->out* functions (except outCommand atm) are replaced with TC_LOG_* macros.
    Memleak fix
2013-05-13 15:07:36 +02:00
Spp
be3826825e Core/Logging: Use correct realmId when logging to DB 2013-01-16 08:59:56 +01:00
Vincent_Michael
cc65aba789 Update copyright note for 2013.
Happy new year.
2013-01-01 00:41:01 +01:00
Shauren
f1170ba0fb Core: Fixed some level 4 warnings (msvc) 2012-12-31 20:43:14 +01:00
Spp
2251d1bfae Core/Misc: Set mode 0644 for files 2012-11-27 13:03:12 +01:00
Shauren
7dc26c7ff7 Core/Misc: Warning fixes 2012-08-21 18:20:42 +02:00
Spp
55ce180f28 Core/Logging: Add Asyncronous logging with Loggers ("What to log") and Appenders ("Where to log") system. Will allow to select to full log some parts of core while others are not even logged.
- Logging System is asyncronous to improve performance.
- Each msg and Logger has a Log Type and Log Level assigned. Each msg is assigned the Logger of same Log Type or "root" Logger is selected if there is no Logger configured for the given Log Type
- Loggers have a list of Appenders to send the msg to. The Msg in the Logger is not sent to Appenders if the msg LogLevel is lower than Logger LogLevel.
- There are three (at the moment) types of Appenders: Console, File or DB (this is WIP, not working ATM). Msg is not written to the resource if msg LogLevel is lower than Appender LogLevel.
- Appender and Console Log levels can be changed while server is active with command '.set loglevel (a/l) name level'

Explanation of use with Sample config:

Appender.Console.Type=1       (1 = Console)
Appender.Console.Level=2      (2 = Debug)

Appender.Server.Type=2        (2 = File)
Appender.Server.Level=3       (3 = Info)
Appender.Server.File=Server.log

Appender.SQL.Type=2           (2 = File)
Appender.SQL.Level=1          (1 = Trace)
Appender.SQL.File=sql.log

Appenders=Console Server      (NOTE: SQL has not been included here... that will make core ignore the config for "SQL" as it's not in this list)

Logger.root.Type=0            (0 = Default - if it's not created by config, server will create it with LogLevel = DISABLED)
Logger.root.Level=5           (5 = Error)
Logger.root.Appenders=Console

Logger.SQL.Type=26            (26 = SQL)
Logger.SQL.Level=3            (2 = Debug)
Logger.SQL.Appenders=Console Server SQL

Logger.SomeRandomName.Type=24 (24 = Guild)
Logger.SomeRandomName.Level=5 (5 = Error)
Loggers=root SQL SomeRandomName

* At loading Appender SQL will be ignored, as it's not present on "Appenders"

* sLog->outDebug(LOG_FILTER_GUILD, "Some log msg related to Guilds")
  - Msg is sent to Logger of Type LOG_FILTER_GUILD (24). Logger with name SomeRandomName is found but it's LogLevel = 5 and Msg LogLevel=2... Msg is not logged

* sLog->outError(LOG_FILTER_GUILD, "Some error log msg related to Guilds")
  - Msg is sent to Logger of Type LOG_FILTER_GUILD (24). Logger with name SomeRandomeName is found with proper LogLevel but Logger does not have any Appenders assigned to that logger... Msg is not logged

* sLog->outDebug(LOG_FILTER_SQL, "Some msg related to SQLs")
  - Msg is sent to Logger SQL (matches type), as it matches LogLevel the msg is sent to Appenders Console, Server and SQL
    - Appender Console has lower Log Level: Msg is logged to Console
    - Appender Server has higher Log Level: Msg is not logged to file
    - Appender SQL has lower Log Level: Msg is logged to file sql.log

* sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Some msg related to Battelgrounds")
  - Msg is sent to Logger root (Type 0) as no Logger was found with Type LOG_FILTER_BATTLEGROUND (13). As Logger has higher LogLevel msg is not sent to any appender

* sLog->outError(LOG_FILTER_BATTLEGROUND, "Some error msg related to Battelgrounds")
  - Msg is sent to Logger root (Type 0) as no Logger was found with Type LOG_FILTER_BATTLEGROUND (13). Msg has lower LogLevel and is sent to Appender Console
    - Appender Console has lower LogLevel: Msg is logged to Console
2012-08-03 14:20:18 +02:00
Machiavelli
e95d614f52 Core/Misc: Prevent calling ACE_Task_Base::wait() on an invalid handle. WorldSocketMgr::Wait is already called in WorldRunnable post-service hook 2012-03-28 12:50:02 +02:00
click
6afaed4a02 Core: Remove the MersenneTwiser-library (SFMT is now considered stable enough for full deployment) 2012-03-27 02:27:12 +02:00
Machiavelli
e960016dc4 Partial revert of "Core/DB Layer: Fix a memory leak.", mysql library related stuff. Original memory leak fix is still in place. 2012-03-26 13:33:47 +02:00
Machiavelli
43048afc7e Core/DB Layer: Fix a memory leak. 2012-03-26 08:29:41 +02:00
kaelima
19f821d00a Auth/Realmlist: Make use of RealmFlags and rename color to flag (core- and dbwise)
Also fix connecting with realmflag & 4
2012-03-26 05:14:10 +02:00
leak
4665d5bfc4 Core/DBLayer: Remnant cleanups 2012-03-19 18:09:14 +01:00
leak
178c658363 Core/DBLayer: Convert DirectExecute() queries that are not runtime relevant back to regular queries 2012-03-19 18:09:13 +01:00
click
e615fba7f8 Revert "Core: Fix the SFMT randgen-initbug" - alignment-fix is now properly handled within the respective code
This reverts commit 28310f0938.
2012-02-25 20:39:28 +01:00
Elron103
28310f0938 Core: Fix the SFMT randgen-initbug
Signed-off-by: click <click@gonnamakeyou.com>
2012-02-25 02:16:08 +01:00
leak
ced346076b Merge pull request #4567 from Kiperr/master
Happy new year!
2011-12-31 16:13:28 -08:00
leak
cdbeb42e0f Core/DBLayer: Refactor prepared statement defines to new format (char db) 2012-01-01 01:09:38 +01:00
kiper
8299627ed9 Update headers for 2012. HAPPY NEW YEAR!!! 2012-01-01 00:32:13 +01:00
leak
8adac3f246 Core/DBLayer: Convert PExecute() queries to prepared statements No. 3 2011-12-31 00:32:05 +01:00
Nay
c19a6c7e31 Core/Loading: Drop the field script_version from the table version.
It serves no purpose (and one step closer to remove EAI from the core/db)
2011-10-28 23:00:00 +01:00
Spp
b16d2245bb Cosmetic: Multiple cosmetic changes
- Added missing space to 'if', 'for', 'while' and 'switch' when it's followed by '('
- Added missing space after a comma and remove space before comma (with some exceptions)
- Remove trailing spaces
- Convert tab to spaces

Note: Only affects files with extension "cpp" and "h" under /src/server
2011-09-29 12:43:05 +02:00
Spp
be12603150 Configuration/ConfigMgr: converted from singleton to namespace with free functions. 2011-09-28 13:00:43 +02:00
Spp
af05915b9e [Cosmetic] Apply codestyle "XXX * " and "XXX *" changed to "XXX* " (with some exceptions) 2011-09-15 14:12:57 +02:00
click
d7715fa4b8 Buildsystem/Windows: Add support for reading commithash and commitdate directly from the executable binaries.
To view this information, check the "Product Version" field in Properties on the respective daemon.

+ Fix worldserver/authserver .rc file layouts and content (now adheres to MS standards *sighs*)
+ Change .serv info output to show corename followed by the commit date and hash
+ Include showing the versionstring on worldserver startup completion (on Aokromes' request)

Thanks to Paradox for bugging me enough about it and the initial pull-request.
2011-08-04 22:53:33 +02:00
leak
1003f30448 Add spaces after commas 2011-04-29 20:47:02 +02:00
click
6a431f745c Core: get rid of the revision-id once and for all - it's not useful in a DVCS at all 2011-04-28 18:53:23 +02:00
runningnak3d
e196dd80bd Core/WorldServer: Some minor text and code style clean up. 2011-04-12 16:46:37 -04:00
Azazel
37a6fe2ae7 Core/CharDB Cleanup: alter character_battleground_data table making column names lowerCamel and move all queries to prepared statements. 2011-04-08 11:28:10 +06:00
Shocker
2c28d383b3 Core/Master: Use ASSERT to halt server in freeze detector 2011-04-07 13:14:26 +03:00
laly
b9af020e72 Core/Cleanup: Drop some unused code.
Closes #1010, #581, and #248
2011-03-26 03:28:59 +02:00