diff options
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(); |