diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2008-09-16 01:20:43 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2008-09-16 01:20:43 +0200 |
commit | cc35771abf4fc7e0dd472bd818ff2b4962c7e204 (patch) | |
tree | 682bc38ffbf5954a93b1967a700f40bd78038ee4 /src/Core/Requests | |
parent | 2226256eedb2849f387ff566893a91bf5da3cdc9 (diff) | |
download | mad-cc35771abf4fc7e0dd472bd818ff2b4962c7e204.tar mad-cc35771abf4fc7e0dd472bd818ff2b4962c7e204.zip |
Bessere Fehlerbehandlung
Diffstat (limited to 'src/Core/Requests')
-rw-r--r-- | src/Core/Requests/DaemonStatusRequest.cpp | 9 | ||||
-rw-r--r-- | src/Core/Requests/DaemonStatusRequest.h | 2 |
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); }; } |