diff options
author | George Hazan <george.hazan@gmail.com> | 2015-08-11 13:33:42 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-08-11 13:33:42 +0000 |
commit | 85bd008c039eb1d93894e94fba9d158a42a71a12 (patch) | |
tree | 2d72d10759f6928e9e4b960175d2de01b5cf7e12 /protocols/Xfire/src/sendkeepalivepacket.cpp | |
parent | 222802c2986dcaf029fdfb828b7679bdabfa7bb2 (diff) |
massive code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@14910 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Xfire/src/sendkeepalivepacket.cpp')
-rw-r--r-- | protocols/Xfire/src/sendkeepalivepacket.cpp | 44 |
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; + } }; |