diff options
Diffstat (limited to 'src/Server/RequestHandlers')
6 files changed, 11 insertions, 16 deletions
diff --git a/src/Server/RequestHandlers/DaemonListRequestHandler.cpp b/src/Server/RequestHandlers/DaemonListRequestHandler.cpp index 6c17ce1..fc6900c 100644 --- a/src/Server/RequestHandlers/DaemonListRequestHandler.cpp +++ b/src/Server/RequestHandlers/DaemonListRequestHandler.cpp @@ -19,7 +19,6 @@ #include "DaemonListRequestHandler.h" #include "../ConnectionManager.h" -#include <Common/Logger.h> namespace Mad { namespace Server { diff --git a/src/Server/RequestHandlers/DaemonRequestHandlerGroup.cpp b/src/Server/RequestHandlers/DaemonRequestHandlerGroup.cpp index 4ff8c40..0e21fdd 100644 --- a/src/Server/RequestHandlers/DaemonRequestHandlerGroup.cpp +++ b/src/Server/RequestHandlers/DaemonRequestHandlerGroup.cpp @@ -21,7 +21,7 @@ #include "../ConnectionManager.h" #include "../Requests/CommandRequest.h" -#include <Common/Logger.h> +#include <Core/Logger.h> #include <Common/Requests/FSInfoRequest.h> #include <Common/Requests/StatusRequest.h> @@ -31,11 +31,11 @@ namespace RequestHandlers { void DaemonRequestHandlerGroup::DaemonRequestHandler::handlePacket(boost::shared_ptr<const Common::XmlPacket> packet) { if(packet->getType() != type) { - Common::Logger::log(Common::Logger::ERROR, "Received an unexpected packet."); + Core::Logger::log(Core::Logger::ERROR, "Received an unexpected packet."); Common::XmlPacket ret; ret.setType("Error"); - ret.add("ErrorCode", Net::Exception::UNEXPECTED_PACKET); + ret.add("ErrorCode", Core::Exception::UNEXPECTED_PACKET); sendPacket(ret); @@ -59,7 +59,7 @@ void DaemonRequestHandlerGroup::DaemonRequestHandler::handlePacket(boost::shared request->connectSignalFinished(boost::bind(&DaemonRequestHandlerGroup::DaemonRequestHandler::requestFinished, this, _1, _2)); Common::RequestManager::get()->sendRequest(daemonCon.get(), request); } - catch(Net::Exception &e) { + catch(Core::Exception &e) { Common::XmlPacket ret; ret.setType("Error"); ret.add("ErrorCode", e.getErrorCode()); @@ -72,7 +72,7 @@ void DaemonRequestHandlerGroup::DaemonRequestHandler::handlePacket(boost::shared } } -void DaemonRequestHandlerGroup::DaemonRequestHandler::requestFinished(boost::shared_ptr<const Common::XmlPacket> packet, Net::Exception error) { +void DaemonRequestHandlerGroup::DaemonRequestHandler::requestFinished(boost::shared_ptr<const Common::XmlPacket> packet, Core::Exception error) { if(error) { Common::XmlPacket ret; ret.setType("Error"); diff --git a/src/Server/RequestHandlers/DaemonRequestHandlerGroup.h b/src/Server/RequestHandlers/DaemonRequestHandlerGroup.h index 7c0b127..7a709f4 100644 --- a/src/Server/RequestHandlers/DaemonRequestHandlerGroup.h +++ b/src/Server/RequestHandlers/DaemonRequestHandlerGroup.h @@ -21,7 +21,7 @@ #define MAD_SERVER_REQUESTHANDLERS_DAEMONREQUESTHANDLERGROUP_H_ #include <Common/RequestHandlerGroup.h> -#include <Net/Exception.h> +#include <Core/Exception.h> namespace Mad { namespace Server { @@ -33,7 +33,7 @@ class DaemonRequestHandlerGroup : public Common::RequestHandlerGroup { private: std::string type; - void requestFinished(boost::shared_ptr<const Common::XmlPacket> packet, Net::Exception error); + void requestFinished(boost::shared_ptr<const Common::XmlPacket> packet, Core::Exception error); protected: virtual void handlePacket(boost::shared_ptr<const Common::XmlPacket> packet); diff --git a/src/Server/RequestHandlers/IdentifyRequestHandler.cpp b/src/Server/RequestHandlers/IdentifyRequestHandler.cpp index abee878..e48563b 100644 --- a/src/Server/RequestHandlers/IdentifyRequestHandler.cpp +++ b/src/Server/RequestHandlers/IdentifyRequestHandler.cpp @@ -19,7 +19,6 @@ #include "IdentifyRequestHandler.h" #include "../ConnectionManager.h" -#include <Common/Logger.h> namespace Mad { diff --git a/src/Server/RequestHandlers/LogRequestHandler.cpp b/src/Server/RequestHandlers/LogRequestHandler.cpp index 1e3f5b4..f33aad4 100644 --- a/src/Server/RequestHandlers/LogRequestHandler.cpp +++ b/src/Server/RequestHandlers/LogRequestHandler.cpp @@ -18,8 +18,7 @@ */ #include "LogRequestHandler.h" -#include <Common/Logger.h> -#include <Common/LogManager.h> +#include <Core/LogManager.h> #include "../ConnectionManager.h" namespace Mad { @@ -30,11 +29,11 @@ void LogRequestHandler::handleRequest(boost::shared_ptr<const Common::XmlPacket> // TODO Require authentication try { - Common::LogManager::get()->log((*packet)["category"], (*packet)["level"], (*packet)["timestamp"], (*packet)["message"], + Core::LogManager::get()->log((*packet)["category"], (*packet)["level"], (*packet)["timestamp"], (*packet)["message"], ConnectionManager::get()->getDaemonName(getConnection())); } - catch(Net::Exception &e) { - Common::Logger::logf(Common::Logger::ERROR, "Can't determine daemon name: %s", e.strerror().c_str()); + catch(Core::Exception &e) { + Core::Logger::logf(Core::Logger::ERROR, "Can't determine daemon name: %s", e.strerror().c_str()); } ret->setType("OK"); diff --git a/src/Server/RequestHandlers/UserRequestHandlerGroup.cpp b/src/Server/RequestHandlers/UserRequestHandlerGroup.cpp index 1ff8883..7836c34 100644 --- a/src/Server/RequestHandlers/UserRequestHandlerGroup.cpp +++ b/src/Server/RequestHandlers/UserRequestHandlerGroup.cpp @@ -18,8 +18,6 @@ */ #include "UserRequestHandlerGroup.h" - -#include <Common/Logger.h> #include "../UserManager.h" namespace Mad { |