Commit Graph

48 Commits

Author SHA1 Message Date
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
Shauren
2f79b0f266 Core: Removed all double (and more) empty lines 2011-03-21 10:52:14 +01:00
leak
137b079eea Core: Generic cleanup (tab2spaces/trailing whitespace removal) 2011-01-26 01:03:35 +01:00
Machiavelli
52cd2cbd7e Core/Maps: Unload transports in MapManager::UnloadAll instead of singleton destructor.
Core/Transports: Properly delink units from transports on transport desutruction. - Thanks to Shauren for help.
Core/ObjectAccessor: Unload corpse 'storage' in added UnloadAll method called in WorldRunnable postservice hook.
Core/Master: Change some postservice queries to syncrhonous (direct) execution to ensure execution on shutdown
Core/Master: Remove redundant calls to ACE::init and ACE::fini

These changes were made to fix crash/freeze issues on shutdown.
2011-01-16 00:08:52 +01:00
Machiavelli
bd85914d92 Core/DBLayer: Properly manage mysql library initialization and shutdown in authserver and worldserver. Prevent multiple calls and make it more elegant. 2011-01-13 21:30:37 +01:00
Machiavelli
957c69de83 Update copyright note for 2011.
Happy new year.
2011-01-01 15:01:13 +01:00
Shauren
4e697869a0 Core/World: Set realm status as invalid during startup and online when initialized
--HG--
branch : trunk
2010-12-28 17:56:15 +01:00
Shauren
928443d899 Core: Removed more operator workarounds for ACE_Singleton (missed previously because of inconsistent naming)
--HG--
branch : trunk
2010-12-23 23:25:44 +01:00
click
2642894342 Core: Add new system for parallelizing client packet processing. Handle WorldSession updates in Map::Update() where we are safe to proceed. Patch by Ambal.
(And clean up tabs and whitespace while rummaging around in there)
Closes issue 5084.

--HG--
branch : trunk
2010-12-13 22:37:56 +01:00
Machiavelli
f1a73e89b8 Merge
--HG--
branch : trunk
2010-12-13 16:13:32 +01:00
Machiavelli
ea29d87dcc Backed out changeset: 8326a2411148
--HG--
branch : trunk
2010-12-13 09:18:49 +01:00
click
7e0dee8cb1 Fix build
--HG--
branch : trunk
2010-12-10 01:44:34 +01:00
Derex
ef768a8307 Rewrite remote access console using ACE
--HG--
branch : trunk
2010-12-10 01:01:44 +02:00
Machiavelli
f5d6319d4d Core/DBLayer:
- Make the mysql connectionpool shared for async and syncrhonous connections.
- Allow configurable amount of connections for the pool
- Allow configurable amount of delaythreads
Note that delaythreads now only represent in-core threads. Whenever they execute a task they will pick a free connection from the pool instead of using their previously unique assigned connection.
The purpose of this design change is better distribution of SQL requests (no bottlenecks paired with idling) among available resources.
This also prevents a ¨memory waste¨ of preparing async prepared statements on synchronous connections (that were never called) - and vice versa. Now, connections aren´t explicitly async or synchronous, they serve both purposes.

Use at own risk, might cause instabilities.
Don´t forget to update your config files and clear your cmake cache.

--HG--
branch : trunk
2010-12-04 21:50:36 +01:00
silinoron
da4c2339bc Core: Add a warning message for those who are using SFMT for random number generation.
Patch and suggestion by Paradox.

--HG--
branch : trunk
2010-10-27 19:51:41 -07:00
click
f0c4241ea4 Remove the accidental additions of CRLF-crap from the header updates
--HG--
branch : trunk
2010-10-07 15:35:36 +02:00
click
8ea4b32fab Update copyright headers (following the same standard in all files = good)
--HG--
branch : trunk
2010-10-07 12:41:56 +02:00
Machiavelli
c4710bde76 Core/DBLayer: Fix MySQL timeout issue. World runnable will now call KeepAlive on each database after a specified number of seconds (MaxPingTime in worldserver.conf)
Based on patch by kingarus81
Fixes issue #4062

Also remove explicit numbering from WorldTimers enum

--HG--
branch : trunk
2010-10-02 14:26:58 +02:00
Spp
e27976102d Core/: Fix warnings
--HG--
branch : trunk
2010-09-28 14:48:17 +02:00
Machiavelli
a9e9a2c884 Core/DBLayer:
- DB Threading model update
* Get rid of ThreadBundleMask and bundled connection
* Implement configurable amount of Synch threads for databasepools
* Use modulus based algorithm to check for free synchronous connections instead of previous ¨get connection by thread key or bundlemask¨ feature
* Locks on mysql context objects are now managed outside the mysql query methods

Fixes issue #4058
Fixes issue #4059
Introduces a ton of more issues. Use at own risk. You were warned. Really.

Don´t forget to update your worldserver.conf

--HG--
branch : trunk
2010-09-27 00:20:56 +02:00
Machiavelli
62946f9ef6 Core/DBLayer:
- Rewrite KeepAlive method for DatabaseWorkerPool. Use mysql_ping instead of explicit select queries, and also schedule KeepAlives for asynchronous threads.
NOTE: While the function is implemented and previous keepalive calls were transformed, it´s possible the keepalive call will need to be placed in several other locations in the code. Please leave feedback on whether or not this fixes your timeout issues.

Update issue #4062

--HG--
branch : trunk
2010-09-25 01:05:24 +02:00
click
bf664b7a44 Cleanup/Core: Remove whitespace and tabs
--HG--
branch : trunk
2010-09-12 01:40:27 +02:00
Shocker
d207f0d9a5 Fix compilation, thanks tru.bazoozoo, closes issue 3778
--HG--
branch : trunk
2010-09-03 16:56:17 +03:00
Machiavelli
273679c5ba Core/DBLayer
- Store threadbundlemask internally per database pool and prevent direct access to config file post startup
- Fix threadbundlemask flag checking for ReactorRunnable, WorldRunnable
- Remove CLI threadbundlemask flag, CLI doesn´t need a seperate mysql connection nor thread
- Remove unused Character Database connection from WorldSocketMgr / ReactorRunnable
- Add proper LoginDatabase connection to RA Runnable (soon to be overhauled)

Note: still experimental and not tested for live use

--HG--
branch : trunk
2010-09-03 10:52:32 +02:00
silinoron
8649bee17f Replace World::getConfig with World::getFloatConfig, World::getIntConfig, and World::getBoolConfig.
Also fix a warning from a previous commit.

--HG--
branch : trunk
2010-08-23 19:56:47 -07:00
Machiavelli
87218eadcd * HIGHLY EXPERIMENTAL - USE AT OWN RISK *
Database Layer:
- Implement connection pooling: Instead of 1 delay thread per database, you can configure between 1 and 32 worker threads that have a seperate thread in the core and have a seperate connection to the MySQL server (based on raczman/Albator´s database layer for Trinitycore3)
- Implement a configurable thread bundle for synchroneous requests from seperate core threads (see worldserver.conf.dist for more info)
- Every mapupdate thread now has its seperate MySQL connection to the world and characters database
- Drop inconsistent PExecuteLog function - query logging will be implemented CONSISTENTLY later
- Drop current prepared statement interface - this will be done *properly* later
- You´ll need to update your worldserver.conf and authserver.conf
- You´re recommended to make a backup of your databases before using this.
* HIGHLY EXPERIMENTAL - USE AT OWN RISK *
* HIGHLY EXPERIMENTAL - USE AT OWN RISK *
etc.

--HG--
branch : trunk
2010-08-18 02:25:52 +02:00
click
b4bef54b7a Fix Windows-build (YES, IT COMPILES!) - partial revert of revision a9386a2655
- Use minihack on ACE to avoid using config.h on Windows platforms
- Put include-locations for ACE in AFTER everything else (for later use)
An insane thanks to paradox for being patient with testing changes and swapouts

--HG--
branch : trunk
2010-08-16 09:51:37 +02:00
click
916c7f09f8 Buildsystem/Linux: Deprecate and remove use of FindTermcap.cmake - it was only used as a solution for older CentOS versions
Core/Genrevision: Move defines from SystemConfig.h file into into revision.h (might need a rename now?) and delete it.
This should remove the infamous "rebuild all of game plzkthx"-symptom when upgrading to newer revisions.

--HG--
branch : trunk
2010-08-14 21:28:00 +02:00
click
c298bdb662 Remove duplicate "Error:" from some outError messages...
--HG--
branch : trunk
2010-07-31 03:12:51 +02:00
click
3296a944e7 Convert to using ACE for reading configurationfiles, and remove dependency on dotconfpp configuration library and related files
(patch by astellar - and a thankyou to vladimir for being a russian teddybear)

--HG--
branch : trunk
2010-07-29 01:22:45 +02:00
click
3f9ea75bfa Add SOAP-implementation (based on Benjys patch and adapted for latest core by xk1)
--HG--
branch : trunk
2010-07-23 09:26:23 +02:00
Machiavelli
d54b534dca Small cleanup in Master class, thanks to 41782992@qq.com
Closes issue #2793

--HG--
branch : trunk
2010-06-25 01:30:06 +02:00
Machiavelli
0f7657b68c Get rid of Trinity Singleton and Threading patterns and replace them with ACE_Singletons and ACE_GUARD_x macro´s with ACE_Thread_Mutex´es respectively.
Also get rid of unused CountedReference class that used Trinity threading pattern.

--HG--
branch : trunk
2010-06-25 00:18:01 +02:00
Xanadu
ffaffe3fd7 * Renamed several VS projects and the executables they produce to reflect the new naming convention.
* Cleaned up some useless and redundant preprocessor definitions.
* Fixed the win build so that it correctly uses the mysql lib it built from the sources.
* Note that you still need to use 8615_mysql_openssl_libs.zip for the OpenSSL binaries.
* Also note that Win x64 build from the existing VS files is still fubar (mysql lib...).

--HG--
branch : trunk
2010-06-23 01:47:41 +02:00
Machiavelli
06ef6e2553 Update worldserver log message to indicate which database has a config problem, by Ranger.
Minor codestyle applied in function.

--HG--
branch : trunk
2010-06-21 23:58:27 +02:00
Tartalo
726a76e93a Some cmake fixes for worldserver
--HG--
branch : trunk
2010-06-08 01:34:51 +02:00
click
fd28bc6aff rename world server directory (trinitycore) to worldserver, rename authserver directory (trinityrealm) to authserver to reflect their real purposes
--HG--
branch : trunk
rename : src/server/trinityrealm/AuthCodes.cpp => src/server/authserver/AuthCodes.cpp
rename : src/server/trinityrealm/AuthCodes.h => src/server/authserver/AuthCodes.h
rename : src/server/trinityrealm/AuthSocket.cpp => src/server/authserver/AuthSocket.cpp
rename : src/server/trinityrealm/AuthSocket.h => src/server/authserver/AuthSocket.h
rename : src/server/trinityrealm/CMakeLists.txt => src/server/authserver/CMakeLists.txt
rename : src/server/trinityrealm/Main.cpp => src/server/authserver/Main.cpp
rename : src/server/trinityrealm/RealmAcceptor.h => src/server/authserver/RealmAcceptor.h
rename : src/server/trinityrealm/RealmList.cpp => src/server/authserver/RealmList.cpp
rename : src/server/trinityrealm/RealmList.h => src/server/authserver/RealmList.h
rename : src/server/trinityrealm/RealmSocket.cpp => src/server/authserver/RealmSocket.cpp
rename : src/server/trinityrealm/RealmSocket.h => src/server/authserver/RealmSocket.h
rename : src/server/trinityrealm/TrinityRealm.ico => src/server/authserver/TrinityRealm.ico
rename : src/server/trinityrealm/TrinityRealm.rc => src/server/authserver/TrinityRealm.rc
rename : src/server/trinityrealm/resource.h => src/server/authserver/resource.h
rename : src/server/trinityrealm/trinityrealm.conf.dist => src/server/authserver/trinityrealm.conf.dist
rename : src/server/trinitycore/CMakeLists.txt => src/server/worldserver/CMakeLists.txt
rename : src/server/trinitycore/CliRunnable.cpp => src/server/worldserver/CliRunnable.cpp
rename : src/server/trinitycore/CliRunnable.h => src/server/worldserver/CliRunnable.h
rename : src/server/trinitycore/Main.cpp => src/server/worldserver/Main.cpp
rename : src/server/trinitycore/Master.cpp => src/server/worldserver/Master.cpp
rename : src/server/trinitycore/Master.h => src/server/worldserver/Master.h
rename : src/server/trinitycore/RASocket.cpp => src/server/worldserver/RASocket.cpp
rename : src/server/trinitycore/RASocket.h => src/server/worldserver/RASocket.h
rename : src/server/trinitycore/TrinityCore.ico => src/server/worldserver/TrinityCore.ico
rename : src/server/trinitycore/TrinityCore.rc => src/server/worldserver/TrinityCore.rc
rename : src/server/trinitycore/WorldRunnable.cpp => src/server/worldserver/WorldRunnable.cpp
rename : src/server/trinitycore/WorldRunnable.h => src/server/worldserver/WorldRunnable.h
rename : src/server/trinitycore/resource.h => src/server/worldserver/resource.h
rename : src/server/trinitycore/trinitycore.conf.dist => src/server/worldserver/trinitycore.conf.dist
2010-06-05 22:44:53 +02:00