summaryrefslogtreecommitdiffstats
path: root/src/Server
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2009-05-20 17:00:33 +0200
committerMatthias Schiffer <matthias@gamezock.de>2009-05-20 17:00:33 +0200
commit96767ff85614974ff8c31686bce19001ec5cccd2 (patch)
treee9a66ebde9e6bfd2db81011e63d56834a8b4e943 /src/Server
parent776377bb21ee1cfe0bcdbc000f7c6fa0be227226 (diff)
downloadmad-96767ff85614974ff8c31686bce19001ec5cccd2.tar
mad-96767ff85614974ff8c31686bce19001ec5cccd2.zip
waitWhile-Methoden f?r Connection hinzugef?gt
Diffstat (limited to 'src/Server')
-rw-r--r--src/Server/ConnectionManager.cpp9
1 files changed, 3 insertions, 6 deletions
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<Common::Connection> 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<const ServerConnection*>(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);
}