summaryrefslogtreecommitdiffstats
path: root/src/RCONServer.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-05-01 15:08:15 +0200
committermadmaxoft <github@xoft.cz>2014-05-01 15:08:15 +0200
commit60850fe3e8da936d5b24460f33a1bf8f4d321ace (patch)
tree1720c81696ea344517d7d8b7456ca232445e421c /src/RCONServer.cpp
parentAdded a mention to run as admin. (diff)
downloadcuberite-60850fe3e8da936d5b24460f33a1bf8f4d321ace.tar
cuberite-60850fe3e8da936d5b24460f33a1bf8f4d321ace.tar.gz
cuberite-60850fe3e8da936d5b24460f33a1bf8f4d321ace.tar.bz2
cuberite-60850fe3e8da936d5b24460f33a1bf8f4d321ace.tar.lz
cuberite-60850fe3e8da936d5b24460f33a1bf8f4d321ace.tar.xz
cuberite-60850fe3e8da936d5b24460f33a1bf8f4d321ace.tar.zst
cuberite-60850fe3e8da936d5b24460f33a1bf8f4d321ace.zip
Diffstat (limited to 'src/RCONServer.cpp')
-rw-r--r--src/RCONServer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/RCONServer.cpp b/src/RCONServer.cpp
index d7083ff2b..fd4b26cab 100644
--- a/src/RCONServer.cpp
+++ b/src/RCONServer.cpp
@@ -169,7 +169,7 @@ cRCONServer::cConnection::cConnection(cRCONServer & a_RCONServer, cSocket & a_So
-void cRCONServer::cConnection::DataReceived(const char * a_Data, size_t a_Size)
+bool cRCONServer::cConnection::DataReceived(const char * a_Data, size_t a_Size)
{
// Append data to the buffer:
m_Buffer.append(a_Data, a_Size);
@@ -187,12 +187,12 @@ void cRCONServer::cConnection::DataReceived(const char * a_Data, size_t a_Size)
m_RCONServer.m_SocketThreads.RemoveClient(this);
m_Socket.CloseSocket();
delete this;
- return;
+ return false;
}
if (Length > (int)(m_Buffer.size() + 4))
{
// Incomplete packet yet, wait for more data to come
- return;
+ return false;
}
int RequestID = IntFromBuffer(m_Buffer.data() + 4);
@@ -202,7 +202,7 @@ void cRCONServer::cConnection::DataReceived(const char * a_Data, size_t a_Size)
m_RCONServer.m_SocketThreads.RemoveClient(this);
m_Socket.CloseSocket();
delete this;
- return;
+ return false;
}
m_Buffer.erase(0, Length + 4);
} // while (m_Buffer.size() >= 14)