aboutsummaryrefslogtreecommitdiff
path: root/src/trinitycore/Master.cpp
diff options
context:
space:
mode:
authorXanadu <none@none>2010-05-29 03:16:39 +0200
committerXanadu <none@none>2010-05-29 03:16:39 +0200
commitd104f19469f9a63636f16e0d0765cd6798bccf4b (patch)
tree200c4bb985b503d082a889722bafc3733776e831 /src/trinitycore/Master.cpp
parentde97bd4f00df0265d1c352611d40d82ffacf45d4 (diff)
*Properly initialize members to prevent DB logging before the DB is started. Fixes a rarely seen startup crash.
*Code cleanup. --HG-- branch : trunk
Diffstat (limited to 'src/trinitycore/Master.cpp')
-rw-r--r--src/trinitycore/Master.cpp16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/trinitycore/Master.cpp b/src/trinitycore/Master.cpp
index a4618e01562..adc3e144c68 100644
--- a/src/trinitycore/Master.cpp
+++ b/src/trinitycore/Master.cpp
@@ -499,19 +499,9 @@ bool Master::_StartDB()
sLog.outString("Realm running as realm ID %d", realmID);
///- Initialize the DB logging system
- if(sConfig.GetBoolDefault("EnableLogDB", false))
- {
- // everything successful - set var to enable DB logging once startup finished.
- sLog.SetLogDBLater(true);
- sLog.SetLogDB(false);
- sLog.SetRealmID(realmID);
- }
- else
- {
- sLog.SetLogDBLater(false);
- sLog.SetLogDB(false);
- sLog.SetRealmID(realmID);
- }
+ sLog.SetLogDBLater(sConfig.GetBoolDefault("EnableLogDB", false)); // set var to enable DB logging once startup finished.
+ sLog.SetLogDB(false);
+ sLog.SetRealmID(realmID);
///- Clean the database before starting
clearOnlineAccounts();