summaryrefslogtreecommitdiffstats
path: root/src/Common/Request.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common/Request.cpp')
-rw-r--r--src/Common/Request.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/Common/Request.cpp b/src/Common/Request.cpp
index e27c1b9..723039f 100644
--- a/src/Common/Request.cpp
+++ b/src/Common/Request.cpp
@@ -22,19 +22,17 @@
namespace Mad {
namespace Common {
-Request::slot_type Request::empty_slot(&Request::doNothing);
-
-void Request::handlePacket(const XmlPacket &packet) {
- if(packet.getType() == "Error") {
- finishWithError(Net::Exception(packet["Where"], packet["ErrorCode"], packet["SubCode"], packet["SubSubCode"]));
+void Request::handlePacket(boost::shared_ptr<const XmlPacket> 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
}
- finish(packet);
+ signalFinished(packet);
}
}