diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2009-03-16 19:13:42 +0100 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2009-03-16 19:13:42 +0100 |
commit | 8f098fc3070f791302ec1f497588fab6ed409980 (patch) | |
tree | 6cff9f7bb973342344a22636a5d9ef26c7a0d940 /src/Common/Request.cpp | |
parent | aef0f2e7a5085b8da3aa2e97565215d182d3dd2d (diff) | |
download | mad-8f098fc3070f791302ec1f497588fab6ed409980.tar mad-8f098fc3070f791302ec1f497588fab6ed409980.zip |
Request- und RequestHandler-Interfaces vereinfacht
Diffstat (limited to 'src/Common/Request.cpp')
-rw-r--r-- | src/Common/Request.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
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 <http://www.gnu.org/licenses/>. */ -#include <config.h> - #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 } |