* Ensure 100% that DB logging is enabled/disabled as expected.

--HG--
branch : trunk
This commit is contained in:
XTZGZoReX
2009-04-07 18:42:20 +02:00
parent c6b6a72956
commit 760e31b249
3 changed files with 13 additions and 0 deletions
+1
View File
@@ -1535,6 +1535,7 @@ void World::SetInitialWorldSettings()
} }
else else
{ {
sLog.SetLogDB(false);
sLog.SetLogDBLater(false); sLog.SetLogDBLater(false);
} }
+6
View File
@@ -464,8 +464,14 @@ bool Master::_StartDB()
{ {
// everything successful - set var to enable DB logging once startup finished. // everything successful - set var to enable DB logging once startup finished.
sLog.SetLogDBLater(true); sLog.SetLogDBLater(true);
sLog.SetLogDB(false);
sLog.SetRealmID(realmID); sLog.SetRealmID(realmID);
} }
else
{
sLog.SetLogDBLater(false);
sLog.SetLogDB(false);
}
///- Clean the database before starting ///- Clean the database before starting
clearOnlineAccounts(); clearOnlineAccounts();
+6
View File
@@ -187,6 +187,7 @@ extern int main(int argc, char **argv)
{ {
// everything successful - set var to enable DB logging once startup finished. // everything successful - set var to enable DB logging once startup finished.
sLog.SetLogDBLater(true); sLog.SetLogDBLater(true);
sLog.SetLogDB(false);
// ensure we've set realm to 0 (realmd realmid) // ensure we've set realm to 0 (realmd realmid)
sLog.SetRealmID(0); sLog.SetRealmID(0);
} }
@@ -271,6 +272,11 @@ extern int main(int argc, char **argv)
// login db needs thread for logging // login db needs thread for logging
sLog.SetLogDB(true); sLog.SetLogDB(true);
} }
else
{
sLog.SetLogDB(false);
sLog.SetLogDBLater(false);
}
///- Wait for termination signal ///- Wait for termination signal
while (!stopEvent) while (!stopEvent)