diff options
Diffstat (limited to 'src/Common/RequestHandlers')
-rw-r--r-- | src/Common/RequestHandlers/DisconnectRequestHandler.cpp | 8 | ||||
-rw-r--r-- | src/Common/RequestHandlers/SimpleRequestHandler.cpp | 10 | ||||
-rw-r--r-- | src/Common/RequestHandlers/StatusRequestHandler.cpp | 2 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/Common/RequestHandlers/DisconnectRequestHandler.cpp b/src/Common/RequestHandlers/DisconnectRequestHandler.cpp index 942da0a..6c89ab2 100644 --- a/src/Common/RequestHandlers/DisconnectRequestHandler.cpp +++ b/src/Common/RequestHandlers/DisconnectRequestHandler.cpp @@ -18,8 +18,8 @@ */ #include "DisconnectRequestHandler.h" -#include <Net/Exception.h> -#include "../Logger.h" +#include <Core/Exception.h> +#include <Core/Logger.h> namespace Mad { namespace Common { @@ -27,11 +27,11 @@ namespace RequestHandlers { void DisconnectRequestHandler::handlePacket(boost::shared_ptr<const XmlPacket> packet) { if(packet->getType() != "Disconnect") { - Logger::log(Logger::ERROR, "Received an unexpected packet."); + Core::Logger::log(Core::Logger::ERROR, "Received an unexpected packet."); XmlPacket ret; ret.setType("Error"); - ret.add("ErrorCode", Net::Exception::UNEXPECTED_PACKET); + ret.add("ErrorCode", Core::Exception::UNEXPECTED_PACKET); sendPacket(ret); diff --git a/src/Common/RequestHandlers/SimpleRequestHandler.cpp b/src/Common/RequestHandlers/SimpleRequestHandler.cpp index 0abc484..b6de0f4 100644 --- a/src/Common/RequestHandlers/SimpleRequestHandler.cpp +++ b/src/Common/RequestHandlers/SimpleRequestHandler.cpp @@ -18,9 +18,9 @@ */ #include "SimpleRequestHandler.h" -#include "../Logger.h" -#include <Net/Exception.h> +#include <Core/Logger.h> +#include <Core/Exception.h> namespace Mad { namespace Common { @@ -28,11 +28,11 @@ namespace RequestHandlers { void SimpleRequestHandler::handlePacket(boost::shared_ptr<const XmlPacket> packet) { if(packet->getType() != type) { - Logger::log(Logger::ERROR, "Received an unexpected packet."); + Core::Logger::log(Core::Logger::ERROR, "Received an unexpected packet."); XmlPacket ret; ret.setType("Error"); - ret.add("ErrorCode", Net::Exception::UNEXPECTED_PACKET); + ret.add("ErrorCode", Core::Exception::UNEXPECTED_PACKET); sendPacket(ret); @@ -47,7 +47,7 @@ void SimpleRequestHandler::handlePacket(boost::shared_ptr<const XmlPacket> packe try { handler(packet, &ret); } - catch(Net::Exception e) { + catch(Core::Exception e) { ret.setType("Error"); ret.add("ErrorCode", e.getErrorCode()); ret.add("SubCode", e.getSubCode()); diff --git a/src/Common/RequestHandlers/StatusRequestHandler.cpp b/src/Common/RequestHandlers/StatusRequestHandler.cpp index 25d2f23..95bdd30 100644 --- a/src/Common/RequestHandlers/StatusRequestHandler.cpp +++ b/src/Common/RequestHandlers/StatusRequestHandler.cpp @@ -38,7 +38,7 @@ void StatusRequestHandler::handleRequest(boost::shared_ptr<const Common::XmlPack SystemManager::get()->getMemoryInfo(&totalMem, &freeMem, &totalSwap, &freeSwap); SystemManager::get()->getLoadInfo(¤tLoad, &nProcesses, &loadAvg1, &loadAvg5, &loadAvg15); } - catch(Net::Exception e) {} + catch(Core::Exception e) {} ret->setType("OK"); |