summaryrefslogtreecommitdiffstats
path: root/src/Core/Requests
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2008-09-16 01:20:43 +0200
committerMatthias Schiffer <matthias@gamezock.de>2008-09-16 01:20:43 +0200
commitcc35771abf4fc7e0dd472bd818ff2b4962c7e204 (patch)
tree682bc38ffbf5954a93b1967a700f40bd78038ee4 /src/Core/Requests
parent2226256eedb2849f387ff566893a91bf5da3cdc9 (diff)
downloadmad-cc35771abf4fc7e0dd472bd818ff2b4962c7e204.tar
mad-cc35771abf4fc7e0dd472bd818ff2b4962c7e204.zip
Bessere Fehlerbehandlung
Diffstat (limited to 'src/Core/Requests')
-rw-r--r--src/Core/Requests/DaemonStatusRequest.cpp9
-rw-r--r--src/Core/Requests/DaemonStatusRequest.h2
2 files changed, 6 insertions, 5 deletions
diff --git a/src/Core/Requests/DaemonStatusRequest.cpp b/src/Core/Requests/DaemonStatusRequest.cpp
index 118203f..86ef3c6 100644
--- a/src/Core/Requests/DaemonStatusRequest.cpp
+++ b/src/Core/Requests/DaemonStatusRequest.cpp
@@ -44,14 +44,15 @@ bool DaemonStatusRequest::sendRequest(Net::Connection *connection, uint16_t requ
return true;
}
-bool DaemonStatusRequest::handlePacket(Net::Connection*, const Net::Packet &packet) {
- if(packet.getType() != Net::Packet::OK)
- return false; // TODO Logging
+void DaemonStatusRequest::handlePacket(Net::Connection*, const Net::Packet &packet) {
+ if(packet.getType() != Net::Packet::OK) {
+ signalFinished().emit();
+ return; // TODO Logging
+ }
finished(Net::Packets::HostStatusPacket(packet));
signalFinished().emit();
- return true;
}
}
diff --git a/src/Core/Requests/DaemonStatusRequest.h b/src/Core/Requests/DaemonStatusRequest.h
index b9ec401..ce6e4f7 100644
--- a/src/Core/Requests/DaemonStatusRequest.h
+++ b/src/Core/Requests/DaemonStatusRequest.h
@@ -46,7 +46,7 @@ class DaemonStatusRequest : public Common::Request {
static bool send(Net::Connection *connection, const sigc::slot<void,const Net::Packets::HostStatusPacket&> &callback);
virtual bool sendRequest(Net::Connection *connection, uint16_t requestId);
- virtual bool handlePacket(Net::Connection*, const Net::Packet &packet);
+ virtual void handlePacket(Net::Connection*, const Net::Packet &packet);
};
}