summaryrefslogtreecommitdiffstats
path: root/src/Net/Packets
diff options
context:
space:
mode:
Diffstat (limited to 'src/Net/Packets')
-rw-r--r--src/Net/Packets/CoreStatusPacket.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/Net/Packets/CoreStatusPacket.h b/src/Net/Packets/CoreStatusPacket.h
index a19f8e7..6ec8338 100644
--- a/src/Net/Packets/CoreStatusPacket.h
+++ b/src/Net/Packets/CoreStatusPacket.h
@@ -27,10 +27,6 @@ namespace Net {
namespace Packets {
class CoreStatusPacket : public Packet {
- private:
- CoreStatusPacket& operator=(const CoreStatusPacket &p);
- CoreStatusPacket(const CoreStatusPacket &p);
-
protected:
struct CoreStatusData {
uint32_t uptime;
@@ -53,8 +49,17 @@ class CoreStatusPacket : public Packet {
coreStatusData = (CoreStatusData*)&rawData->data;
}
+ CoreStatusPacket(const CoreStatusPacket &p) : Packet(p) {
+ setLength(sizeof(CoreStatusData));
+ coreStatusData = (CoreStatusData*)&rawData->data;
+ }
+
CoreStatusPacket& operator=(const Packet &p);
+ CoreStatusPacket& operator=(const CoreStatusPacket &p) {
+ return (*this = (Packet)p);
+ }
+
uint32_t getUptime() const {
return ntohl(coreStatusData->uptime);
}