diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2008-09-29 22:26:31 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2008-09-29 22:26:31 +0200 |
commit | 2919e527e3e2c0bbdd35afe28c7da4b041ca25f1 (patch) | |
tree | 58e952b592c576e78a5160dce7e538603d0e4116 /src/madc.cpp | |
parent | 011eb079956c8b08db7b7ecff57503c436b39cbf (diff) | |
parent | 13fd1bb4f19e4791e000cb71cca2065820184bdb (diff) | |
download | mad-2919e527e3e2c0bbdd35afe28c7da4b041ca25f1.tar mad-2919e527e3e2c0bbdd35afe28c7da4b041ca25f1.zip |
Merge
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)); |