From 84a5ceeb7db03d75425d72e8a23a0bb0f267bc01 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 24 Aug 2009 03:06:32 +0200 Subject: =?UTF-8?q?Hash-Klasse=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Server/ConnectionManager.cpp | 8 ++++---- src/Server/ConnectionManager.h | 4 ++-- src/Server/RequestHandlers/ConnectionRequestHandlerGroup.cpp | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src/Server') diff --git a/src/Server/ConnectionManager.cpp b/src/Server/ConnectionManager.cpp index e52e8c4..c49e7e8 100644 --- a/src/Server/ConnectionManager.cpp +++ b/src/Server/ConnectionManager.cpp @@ -58,11 +58,11 @@ bool ConnectionManager::ServerConnection::disconnect() { } boost::shared_ptr ConnectionManager::ServerConnection::authenticate(const std::string &method, - const std::string &user, const std::vector &challenge, std::vector &response) { + const std::string &user, const std::vector &data, std::vector &response) { if(!isIdentified()) type = CLIENT; - authContext = application->getAuthManager()->authenticate(method, user, challenge, response, authContext); + authContext = application->getAuthManager()->authenticate(method, user, data, response, authContext); return authContext; } @@ -294,7 +294,7 @@ void ConnectionManager::identifyDaemonConnection(Common::Connection *con, const } boost::shared_ptr ConnectionManager::authenticateConnection(Common::Connection *con, const std::string &method, - const std::string &user, const std::vector &challenge, std::vector &response) { + const std::string &user, const std::vector &data, std::vector &response) { // TODO Logging ServerConnection *connection = dynamic_cast(con); @@ -305,7 +305,7 @@ boost::shared_ptr ConnectionManager::authenticateConn if(!connection->isIdentified()) connection->identify(); - return connection->authenticate(method, user, challenge, response); + return connection->authenticate(method, user, data, response); } std::vector ConnectionManager::getDaemonList() const { diff --git a/src/Server/ConnectionManager.h b/src/Server/ConnectionManager.h index e045a6a..067ce28 100644 --- a/src/Server/ConnectionManager.h +++ b/src/Server/ConnectionManager.h @@ -102,7 +102,7 @@ class MAD_SERVER_EXPORT ConnectionManager : public Core::Configurable, private b } boost::shared_ptr authenticate(const std::string &method, const std::string &user, - const std::vector &challenge, std::vector &response); + const std::vector &data, std::vector &response); }; friend class Application; @@ -143,7 +143,7 @@ class MAD_SERVER_EXPORT ConnectionManager : public Core::Configurable, private b void identifyDaemonConnection(Common::Connection *con, const std::string &name) throw (Core::Exception); boost::shared_ptr authenticateConnection(Common::Connection *con, const std::string &method, - const std::string &user, const std::vector &challenge, std::vector &response); + const std::string &user, const std::vector &data, std::vector &response); bool isAuthenticated(Common::Connection *con) const; diff --git a/src/Server/RequestHandlers/ConnectionRequestHandlerGroup.cpp b/src/Server/RequestHandlers/ConnectionRequestHandlerGroup.cpp index b59cc3d..37e2e79 100644 --- a/src/Server/RequestHandlers/ConnectionRequestHandlerGroup.cpp +++ b/src/Server/RequestHandlers/ConnectionRequestHandlerGroup.cpp @@ -51,10 +51,10 @@ void ConnectionRequestHandlerGroup::handleAuthRequest(boost::shared_ptr authContext = application->getConnectionManager()->authenticateConnection(connection, packet->get("method"), packet->get("user"), - packet->get&>("challenge"), response); + packet->get&>("data"), response); if(!response.empty()) - ret->set("response", response); + ret->set("data", response); if(authContext->isAuthenticated()) ret->setType("OK"); @@ -109,7 +109,7 @@ void ConnectionRequestHandlerGroup::handleLogRequest(boost::shared_ptrgetConnectionManager()->getDaemonName(connection)); } catch(Core::Exception &e) { - application->logf(Core::LoggerBase::LOG_ERROR, "Can't determine daemon name: %s", e.strerror().c_str()); + application->logf(Core::LoggerBase::LOG_ERROR, "Can't determine daemon name: %s", e.what()); } ret->setType("OK"); -- cgit v1.2.3