summaryrefslogtreecommitdiff
path: root/src/sockets.cpp
diff options
context:
space:
mode:
authorAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2010-04-20 23:33:09 +0000
committerAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2010-04-20 23:33:09 +0000
commitf87398b5320c2172e48d9a40d81c59830869d86e (patch)
treee2e557bf44637da04afb1ddddb2971c8db1a81ba /src/sockets.cpp
parenta6cc0a305e1e098d7e954c8c12570855f69f97cf (diff)
Correctly handle recieving messages over 65.5 thousand bytes
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2901 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/sockets.cpp')
-rw-r--r--src/sockets.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sockets.cpp b/src/sockets.cpp
index b5d058fb2..413b6873a 100644
--- a/src/sockets.cpp
+++ b/src/sockets.cpp
@@ -191,7 +191,7 @@ bool Socket::ProcessRead()
char buffer[NET_BUFSIZE];
memset(&buffer, 0, sizeof(buffer));
- RecvLen = RecvInternal(buffer, sizeof(buffer));
+ RecvLen = RecvInternal(buffer, sizeof(buffer) - 1);
if (RecvLen <= 0)
{
return false;
@@ -233,7 +233,7 @@ bool Socket::ProcessRead()
*/
bool Socket::ProcessWrite()
{
- size_t Written = SendInternal(WriteBuffer);
+ int Written = SendInternal(WriteBuffer);
if (Written == -1)
{
return false;