From 96767ff85614974ff8c31686bce19001ec5cccd2 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 20 May 2009 17:00:33 +0200 Subject: waitWhile-Methoden f?r Connection hinzugef?gt --- src/Server/ConnectionManager.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/Server') diff --git a/src/Server/ConnectionManager.cpp b/src/Server/ConnectionManager.cpp index bbaf673..abb66b0 100644 --- a/src/Server/ConnectionManager.cpp +++ b/src/Server/ConnectionManager.cpp @@ -231,17 +231,14 @@ boost::shared_ptr ConnectionManager::getDaemonConnection(con } } - throw(Net::Exception::NOT_AVAILABLE); + throw Net::Exception(Net::Exception::NOT_AVAILABLE); } std::string ConnectionManager::getDaemonName(const Common::Connection *con) const throw (Net::Exception&) { const ServerConnection *connection = dynamic_cast(con); - if(connection) { - if(connection->isIdentified()) { - return connection->getHostInfo()->getName(); - } - } + if(connection && connection->getConnectionType() == ServerConnection::DAEMON) + return connection->getHostInfo()->getName(); throw Net::Exception(Net::Exception::UNKNOWN_DAEMON); } -- cgit v1.2.3