summaryrefslogtreecommitdiffstats
path: root/src/mad-core.cpp
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2008-09-14 23:16:58 +0200
committerMatthias Schiffer <matthias@gamezock.de>2008-09-14 23:16:58 +0200
commit082dac7a8cb39ec1b005680680c4f3e1e8ddc256 (patch)
tree1db7b02d84cdd1882e15d3a1abfd8e93925a4af6 /src/mad-core.cpp
parentfd9b1506a3b3858235e91cce45805f6d54caae4f (diff)
downloadmad-082dac7a8cb39ec1b005680680c4f3e1e8ddc256.tar
mad-082dac7a8cb39ec1b005680680c4f3e1e8ddc256.zip
Verwende statische Instanzen von ConfigManager, ConnectionManager und RequestManager (Singleton)
Diffstat (limited to 'src/mad-core.cpp')
-rw-r--r--src/mad-core.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/mad-core.cpp b/src/mad-core.cpp
index 0bbee97..4bfbcfc 100644
--- a/src/mad-core.cpp
+++ b/src/mad-core.cpp
@@ -29,20 +29,12 @@ int main() {
sigaddset(&signals, SIGPIPE);
sigprocmask(SIG_BLOCK, &signals, 0);
- Mad::Core::ConfigManager configManager;
-
- Mad::Net::Connection::init();
-
- Mad::Core::ConnectionManager *connectionManager = new Mad::Core::ConnectionManager(configManager);
+ Mad::Core::ConfigManager::useConfigManager();
while(true) {
- if(connectionManager->wait(10000))
- connectionManager->run();
+ if(Mad::Core::ConnectionManager::getConnectionManager()->wait(10000))
+ Mad::Core::ConnectionManager::getConnectionManager()->run();
}
- delete connectionManager;
-
- Mad::Net::Connection::deinit();
-
return 0;
}