summaryrefslogtreecommitdiff
path: root/src/inspsocket.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-07-19 23:19:23 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-07-19 23:19:23 +0000
commit17fe68de7265f7bb1007255d80eb3d310ebd4e53 (patch)
tree8abec665d789ca0eccdbfc94ba5533f132c6603b /src/inspsocket.cpp
parent6a016cb0a6ba93d30fdd16edab1774273d036d69 (diff)
Fix the 4-byte read madness discovered by psychon
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10045 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspsocket.cpp')
-rw-r--r--src/inspsocket.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp
index d4e7e93e7..c12494503 100644
--- a/src/inspsocket.cpp
+++ b/src/inspsocket.cpp
@@ -392,7 +392,7 @@ const char* BufferedSocket::Read()
return NULL;
int n = 0;
- char *ReadBuffer = Instance->GetReadBuffer();
+ char* ReadBuffer = Instance->GetReadBuffer();
if (this->IsIOHooked)
{
@@ -400,7 +400,7 @@ const char* BufferedSocket::Read()
int MOD_RESULT = 0;
try
{
- MOD_RESULT = Instance->Config->GetIOHook(this)->OnRawSocketRead(this->fd, ReadBuffer, sizeof(ReadBuffer) - 1,result2);
+ MOD_RESULT = Instance->Config->GetIOHook(this)->OnRawSocketRead(this->fd, ReadBuffer, Instance->Config->NetBufferSize, result2);
}
catch (CoreException& modexcept)
{
@@ -418,7 +418,7 @@ const char* BufferedSocket::Read()
}
else
{
- n = recv(this->fd, ReadBuffer, sizeof(ReadBuffer) - 1, 0);
+ n = recv(this->fd, ReadBuffer, Instance->Config->NetBufferSize, 0);
}
/*