From 0b27c37fe95c6aced613d51a3624f8930a96ad3f Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 4 Jun 2009 22:23:07 +0200 Subject: RequestHandler-Interface ?berarbeitet --- src/Common/Requests/DisconnectRequest.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/Common/Requests/DisconnectRequest.cpp') diff --git a/src/Common/Requests/DisconnectRequest.cpp b/src/Common/Requests/DisconnectRequest.cpp index 3fac25b..249bbc1 100644 --- a/src/Common/Requests/DisconnectRequest.cpp +++ b/src/Common/Requests/DisconnectRequest.cpp @@ -30,19 +30,19 @@ void DisconnectRequest::sendRequest() { sendPacket(packet); } -void DisconnectRequest::handlePacket(const XmlPacket &packet) { - if(packet.getType() == "Error") { - finishWithError(Net::Exception(packet["Where"], packet["ErrorCode"], packet["SubCode"], packet["SubSubCode"])); +void DisconnectRequest::handlePacket(boost::shared_ptr packet) { + if(packet->getType() == "Error") { + signalFinished(Net::Exception((*packet)["Where"], (*packet)["ErrorCode"], (*packet)["SubCode"], (*packet)["SubSubCode"])); return; } - else if(packet.getType() != "OK") { - finishWithError(Net::Exception(Net::Exception::UNEXPECTED_PACKET)); + else if(packet->getType() != "OK") { + signalFinished(Net::Exception(Net::Exception::UNEXPECTED_PACKET)); return; // TODO Logging } getConnection()->disconnect(); - finish(packet); + signalFinished(packet); } } -- cgit v1.2.3