summaryrefslogtreecommitdiffstats
path: root/src/Common/Requests/DisconnectRequest.cpp
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2009-03-01 00:51:00 +0100
committerMatthias Schiffer <matthias@gamezock.de>2009-03-01 00:51:00 +0100
commit63907817cb057f497f03a28016d408885cbe41ea (patch)
treea9ad6b0b19bff7722b21375137ba6e53c8869c91 /src/Common/Requests/DisconnectRequest.cpp
parent46c110f7a14e4b5d0e8bd27259f7744ae8a36382 (diff)
downloadmad-63907817cb057f497f03a28016d408885cbe41ea.tar
mad-63907817cb057f497f03a28016d408885cbe41ea.zip
Alle uebrigen Requests ausser GSSAPIAuthRequest in XmlRequests umgewandelt
Diffstat (limited to 'src/Common/Requests/DisconnectRequest.cpp')
-rw-r--r--src/Common/Requests/DisconnectRequest.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/Common/Requests/DisconnectRequest.cpp b/src/Common/Requests/DisconnectRequest.cpp
index d8e7ee9..afab8ed 100644
--- a/src/Common/Requests/DisconnectRequest.cpp
+++ b/src/Common/Requests/DisconnectRequest.cpp
@@ -25,18 +25,21 @@ namespace Common {
namespace Requests {
void DisconnectRequest::sendRequest(Net::Connection *connection, uint16_t requestId) {
- connection->send(Net::Packet(Net::Packet::DISCONNECT, requestId));
+ XmlPacket packet;
+ packet.setType("Disconnect");
+
+ connection->send(packet.encode(requestId));
}
-void DisconnectRequest::handlePacket(Net::Connection *connection, const Net::Packet &packet) {
- if(packet.getType() != Net::Packet::OK) {
+void DisconnectRequest::handlePacket(Net::Connection *connection, uint16_t, const XmlPacket &packet) {
+ if(packet.getType() != "OK") {
finishWithError(Exception(Exception::UNEXPECTED_PACKET));
return; // TODO Logging
}
connection->disconnect();
- finish();
+ finish(packet);
}
}