From 8f098fc3070f791302ec1f497588fab6ed409980 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 16 Mar 2009 19:13:42 +0100 Subject: Request- und RequestHandler-Interfaces vereinfacht --- src/Common/Request.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/Common/Request.cpp') diff --git a/src/Common/Request.cpp b/src/Common/Request.cpp index 0b8715e..bc37708 100644 --- a/src/Common/Request.cpp +++ b/src/Common/Request.cpp @@ -17,19 +17,17 @@ * with this program. If not, see . */ -#include - #include "Request.h" namespace Mad { namespace Common { -void Request::handlePacket(Net::Connection *connection _UNUSED_PARAMETER_, uint16_t requestId _UNUSED_PARAMETER_, const XmlPacket &packet) { +void Request::handlePacket(const XmlPacket &packet) { if(packet.getType() == "Error") { finishWithError(Common::Exception(packet["Where"], packet["ErrorCode"], packet["SubCode"], packet["SubSubCode"])); return; } - if(packet.getType() != "OK") { + else if(packet.getType() != "OK") { finishWithError(Exception(Exception::UNEXPECTED_PACKET)); return; // TODO Logging } -- cgit v1.2.3