summaryrefslogtreecommitdiffstats
path: root/src/madc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/madc.cpp')
-rw-r--r--src/madc.cpp16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/madc.cpp b/src/madc.cpp
index 46455b0..e6fc3f0 100644
--- a/src/madc.cpp
+++ b/src/madc.cpp
@@ -17,22 +17,16 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "Net/Connection.h"
#include "Net/FdManager.h"
#include "Net/IPAddress.h"
#include "Net/ThreadManager.h"
#include "Common/ClientConnection.h"
#include "Common/ConfigManager.h"
-#include "Common/LogManager.h"
-#include "Common/Logger.h"
#include "Common/RequestManager.h"
#include "Client/CommandParser.h"
#include "Client/InformationManager.h"
#include <iostream>
-#include <cstring>
-#include <cstdlib>
-#include <string>
#include <readline/readline.h>
#include <readline/history.h>
@@ -79,8 +73,6 @@ int main(int argc, char *argv[]) {
std::exit(1);
}
- Net::Connection::init();
-
Net::ThreadManager::get()->init();
Client::InformationManager::get()->init();
@@ -94,7 +86,7 @@ int main(int argc, char *argv[]) {
std::cerr << "Connecting to " << argv[1] << "..." << std::flush;
while(connection->isConnecting())
- Net::FdManager::get()->run();
+ usleep(100000);
std::cerr << " connected." << std::endl;
@@ -105,7 +97,7 @@ int main(int argc, char *argv[]) {
Client::InformationManager::get()->updateDaemonList(connection);
while(Client::InformationManager::get()->isUpdating())
- Net::FdManager::get()->run();
+ usleep(100000);
std::cerr << " done." << std::endl << std::endl;
@@ -117,7 +109,7 @@ int main(int argc, char *argv[]) {
activateReadline();
while(connection->isConnected())
- Net::FdManager::get()->run();
+ usleep(100000);
Net::FdManager::get()->unregisterFd(STDIN_FILENO);
@@ -131,7 +123,5 @@ int main(int argc, char *argv[]) {
Common::Initializable::deinit();
- Net::Connection::deinit();
-
return 0;
}