diff options
Diffstat (limited to 'src/Common/RequestManager.cpp')
-rw-r--r-- | src/Common/RequestManager.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Common/RequestManager.cpp b/src/Common/RequestManager.cpp index afcfa4b..b5acc5c 100644 --- a/src/Common/RequestManager.cpp +++ b/src/Common/RequestManager.cpp @@ -24,8 +24,6 @@ #include "RequestHandlers/DisconnectRequestHandler.h" #include "Logger.h" -#include <Net/Packets/ErrorPacket.h> - #include <sigc++/bind.h> #include <sigc++/retype_return.h> @@ -163,7 +161,12 @@ void RequestManager::receiveHandler(Net::Connection *connection, const Net::Pack } Logger::log(Logger::ERROR, "Received an unexpected packet."); - connection->send(Net::Packets::ErrorPacket(Net::Packet::ERROR, packet.getRequestId(), Exception(Exception::UNEXPECTED_PACKET))); + + XmlPacket ret; + ret.setType("Error"); + ret.add("ErrorCode", Exception::UNEXPECTED_PACKET); + + connection->send(ret.encode(requestId)); } bool RequestManager::sendRequest(Net::Connection *connection, std::auto_ptr<RequestBase> request) { |