diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2008-09-10 21:46:33 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2008-09-10 21:46:33 +0200 |
commit | c4c91c7cbc6c413e59f05be88e6bd1c6bc83679d (patch) | |
tree | cd6148bbf037eb323bbfe6bd40a697ea0bbd2d17 /src/Core/RequestHandler | |
parent | 55a6045504bee4bf425870b6b427abd5240e7303 (diff) | |
download | mad-c4c91c7cbc6c413e59f05be88e6bd1c6bc83679d.tar mad-c4c91c7cbc6c413e59f05be88e6bd1c6bc83679d.zip |
Server-Status-Abfrage zeigt jetzt uptime an
Diffstat (limited to 'src/Core/RequestHandler')
-rw-r--r-- | src/Core/RequestHandler/CoreStatusRequestHandler.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Core/RequestHandler/CoreStatusRequestHandler.h b/src/Core/RequestHandler/CoreStatusRequestHandler.h index 5a3c16e..eec0154 100644 --- a/src/Core/RequestHandler/CoreStatusRequestHandler.h +++ b/src/Core/RequestHandler/CoreStatusRequestHandler.h @@ -21,7 +21,9 @@ #define MAD_CORE_REQUESTHANDLER_CORESTATUSREQUESTHANDLER_H_ #include <Common/RequestHandler.h> -#include <Net/Packet.h> +#include <Common/SystemBackend.h> +#include <Net/Packets/CoreStatusPacket.h> + #include <cstring> #include <gssapi/gssapi.h> @@ -42,7 +44,9 @@ class CoreStatusRequestHandler : public Common::RequestHandler { if(packet.getType() != Net::Packet::TYPE_CORE_STATUS) return false; // TODO Logging - if(!connection->send(Net::Packet(Net::Packet::TYPE_OK, packet.getRequestId()))) + Common::SystemBackend::Uptime uptime = Common::SystemBackend::getBackend()->getUptime(); + + if(!connection->send(Net::Packets::CoreStatusPacket(Net::Packet::TYPE_OK, packet.getRequestId(), uptime.uptime, uptime.idleTime))) return false; setFinished(); |