From 63907817cb057f497f03a28016d408885cbe41ea Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 1 Mar 2009 00:51:00 +0100 Subject: Alle uebrigen Requests ausser GSSAPIAuthRequest in XmlRequests umgewandelt --- src/Common/Requests/FSInfoRequest.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/Common/Requests/FSInfoRequest.cpp') diff --git a/src/Common/Requests/FSInfoRequest.cpp b/src/Common/Requests/FSInfoRequest.cpp index c8492ff..7b5574d 100644 --- a/src/Common/Requests/FSInfoRequest.cpp +++ b/src/Common/Requests/FSInfoRequest.cpp @@ -27,16 +27,19 @@ namespace Common { namespace Requests { void FSInfoRequest::sendRequest(Net::Connection *connection, uint16_t requestId) { - connection->send(Net::Packet(Net::Packet::FS_INFO, requestId)); + XmlPacket packet; + packet.setType("FSInfo"); + + connection->send(packet.encode(requestId)); } -void FSInfoRequest::handlePacket(Net::Connection*, const Net::Packet &packet) { - if(packet.getType() != Net::Packet::OK) { +void FSInfoRequest::handlePacket(Net::Connection*, uint16_t, const Common::XmlPacket &packet) { + if(packet.getType() != "OK") { finishWithError(Exception(Exception::UNEXPECTED_PACKET)); return; // TODO Logging } - finish(Net::Packets::FSInfoPacket(packet)); + finish(packet); } } -- cgit v1.2.3