summaryrefslogtreecommitdiffstats
path: root/src/Net/Packets/CoreStatusPacket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Net/Packets/CoreStatusPacket.cpp')
-rw-r--r--src/Net/Packets/CoreStatusPacket.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/Net/Packets/CoreStatusPacket.cpp b/src/Net/Packets/CoreStatusPacket.cpp
index 4397fa8..ad2a7fb 100644
--- a/src/Net/Packets/CoreStatusPacket.cpp
+++ b/src/Net/Packets/CoreStatusPacket.cpp
@@ -24,12 +24,20 @@ namespace Mad {
namespace Net {
namespace Packets {
-CoreStatusPacket::CoreStatusPacket(Type type, uint16_t requestId, uint32_t uptime, uint32_t idleTime) : Packet(type, requestId) {
+CoreStatusPacket::CoreStatusPacket(Type type, uint16_t requestId, uint32_t uptime, uint32_t idleTime,
+ uint32_t totalMem, uint32_t freeMem, uint32_t totalSwap, uint32_t freeSwap)
+: Packet(type, requestId)
+{
setLength(sizeof(CoreStatusData));
coreStatusData = (CoreStatusData*)&rawData->data;
coreStatusData->uptime = htonl(uptime);
coreStatusData->idleTime = htonl(idleTime);
+
+ coreStatusData->totalMem = htonl(totalMem);
+ coreStatusData->freeMem = htonl(freeMem);
+ coreStatusData->totalSwap = htonl(totalSwap);
+ coreStatusData->freeSwap = htonl(freeSwap);
}
CoreStatusPacket& CoreStatusPacket::operator=(const Packet &p) {