diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2008-09-29 18:16:20 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2008-09-29 18:16:20 +0200 |
commit | 3086f10f53ced17ab4a237ab57da62395d259f0a (patch) | |
tree | ab6b9a8d03930d58637c1d6649b9c144aa1d4c03 /src/madc.cpp | |
parent | 6f77ab53ea6ad3cf96b0f04136cf4cfc27b2a6ad (diff) | |
download | mad-3086f10f53ced17ab4a237ab57da62395d259f0a.tar mad-3086f10f53ced17ab4a237ab57da62395d259f0a.zip |
InformationManager zur Verwaltung der Host-Liste hinzugef?gt
Diffstat (limited to 'src/madc.cpp')
-rw-r--r-- | src/madc.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/madc.cpp b/src/madc.cpp index b109448..a2c7fda 100644 --- a/src/madc.cpp +++ b/src/madc.cpp @@ -24,6 +24,7 @@ #include "Common/RequestManager.h" #include "Common/Util.h" #include "Client/CommandParser.h" +#include "Client/InformationManager.h" #include <iostream> #include <cstring> @@ -94,10 +95,23 @@ int main(int argc, char *argv[]) { connection->sendReceive(fd.revents); } - std::cerr << " connected." << std::endl << std::endl; + std::cerr << " connected." << std::endl; Common::RequestManager::getRequestManager()->registerConnection(connection); + std::cerr << "Receiving host list..." << std::flush; + + Client::InformationManager::init(connection); + + while(!Client::InformationManager::getInformationManager()->isInitialised()) { + struct pollfd fd = connection->getPollfd(); + + if(poll(&fd, 1, 10000) > 0) + connection->sendReceive(fd.revents); + } + + std::cerr << " done." << std::endl << std::endl; + parser = new Mad::Client::CommandParser(connection); parser->signalFinished().connect(sigc::ptr_fun(activateReadline)); |