summaryrefslogtreecommitdiff
path: root/protocols/Xfire/src/sendkeepalivepacket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Xfire/src/sendkeepalivepacket.cpp')
-rw-r--r--protocols/Xfire/src/sendkeepalivepacket.cpp44
1 files changed, 21 insertions, 23 deletions
diff --git a/protocols/Xfire/src/sendkeepalivepacket.cpp b/protocols/Xfire/src/sendkeepalivepacket.cpp
index 242ba88214..9a9af9ed05 100644
--- a/protocols/Xfire/src/sendkeepalivepacket.cpp
+++ b/protocols/Xfire/src/sendkeepalivepacket.cpp
@@ -24,33 +24,31 @@
#include "sendkeepalivepacket.h"
#include "variablevalue.h"
-#include <string.h>
-namespace xfirelib {
+namespace xfirelib
+{
+ int SendKeepAlivePacket::getPacketContent(char *buf)
+ {
+ int index = 0;
- int SendKeepAlivePacket::getPacketContent(char *buf) {
- int index = 0;
+ VariableValue val;
+ val.setName("value");
- VariableValue val;
- val.setName("value");
+ index += val.writeName(buf, index);
+ buf[index++] = 2;
+ buf[index++] = 0;
+ buf[index++] = 0;
+ buf[index++] = 0;
+ buf[index++] = 0;
- index += val.writeName(buf,index);
- buf[index++] = 2;
- buf[index++] = 0;
- buf[index++] = 0;
- buf[index++] = 0;
- buf[index++] = 0;
-
- val.setName("stats");
-
- index += val.writeName(buf,index);
- buf[index++] = 4;
- buf[index++] = 2;
- buf[index++] = 0;
- buf[index++] = 0;
-
- return index;
- }
+ val.setName("stats");
+ index += val.writeName(buf, index);
+ buf[index++] = 4;
+ buf[index++] = 2;
+ buf[index++] = 0;
+ buf[index++] = 0;
+ return index;
+ }
};