*Properly initialize members to prevent DB logging before the DB is started. Fixes a rarely seen startup crash.

*Code cleanup.

--HG--
branch : trunk
This commit is contained in:
Xanadu
2010-05-29 03:16:39 +02:00
parent de97bd4f00
commit d104f19469
5 changed files with 12 additions and 37 deletions

View File

@@ -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();