summaryrefslogtreecommitdiffstats
path: root/src/Core
diff options
context:
space:
mode:
Diffstat (limited to 'src/Core')
-rw-r--r--src/Core/ConfigManager.cpp2
-rw-r--r--src/Core/ConfigManager.h2
-rw-r--r--src/Core/RequestHandler/CoreStatusRequestHandler.h8
3 files changed, 8 insertions, 4 deletions
diff --git a/src/Core/ConfigManager.cpp b/src/Core/ConfigManager.cpp
index 5f40afd..d42db35 100644
--- a/src/Core/ConfigManager.cpp
+++ b/src/Core/ConfigManager.cpp
@@ -27,7 +27,7 @@ bool ConfigManager::parseLine(const std::vector<std::string> &section, const std
if(section.empty()) {
if(Common::Util::tolower(key) == "configmethod") {
if(Common::Util::tolower(value) == "mysql")
- methods |= (unsigned short)MYSQL;
+ methods |= (uint16_t)MYSQL;
else
return false;
}
diff --git a/src/Core/ConfigManager.h b/src/Core/ConfigManager.h
index 3b23750..6470a33 100644
--- a/src/Core/ConfigManager.h
+++ b/src/Core/ConfigManager.h
@@ -35,7 +35,7 @@ class ConfigManager : public Common::ConfigManager {
MYSQL = (1 << 0)
};
- unsigned short methods;
+ uint16_t methods;
std::vector<Net::IPAddress> listeners;
std::vector<DaemonInfo> daemons;
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();