Adding database thread start/stop functions and init.

This commit is contained in:
lotodore
2009-09-26 22:10:43 +00:00
parent 9e6ca8cd66
commit d0d831a4f6
4 changed files with 21 additions and 0 deletions
+5
View File
@@ -164,6 +164,7 @@ ServerLobbyThread::Init(const string &pwd, const string &logDir)
ReadStatisticsFile();
}
}
m_database->Init("127.0.0.1", "user", "password", "database", "key");
}
void
@@ -594,6 +595,8 @@ void
ServerLobbyThread::Main()
{
InitChatCleaner();
// Start database engine.
m_database->Start();
// Register all timers.
RegisterTimers();
try
@@ -611,6 +614,8 @@ ServerLobbyThread::Main()
m_gameSessionManager.Clear();
// Cancel pending timer callbacks.
CancelTimers();
// Stop database engine.
m_database->Stop();
}
void