diff options
Diffstat (limited to 'src/inspsocket.cpp')
-rw-r--r-- | src/inspsocket.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp index e70b7647b..d4e7e93e7 100644 --- a/src/inspsocket.cpp +++ b/src/inspsocket.cpp @@ -392,6 +392,7 @@ const char* BufferedSocket::Read() return NULL; int n = 0; + char *ReadBuffer = Instance->GetReadBuffer(); if (this->IsIOHooked) { @@ -399,7 +400,7 @@ const char* BufferedSocket::Read() int MOD_RESULT = 0; try { - MOD_RESULT = Instance->Config->GetIOHook(this)->OnRawSocketRead(this->fd,this->ibuf,sizeof(this->ibuf) - 1,result2); + MOD_RESULT = Instance->Config->GetIOHook(this)->OnRawSocketRead(this->fd, ReadBuffer, sizeof(ReadBuffer) - 1,result2); } catch (CoreException& modexcept) { @@ -417,7 +418,7 @@ const char* BufferedSocket::Read() } else { - n = recv(this->fd,this->ibuf,sizeof(this->ibuf) - 1,0); + n = recv(this->fd, ReadBuffer, sizeof(ReadBuffer) - 1, 0); } /* @@ -428,8 +429,8 @@ const char* BufferedSocket::Read() */ if (n > 0) { - ibuf[n] = 0; - return ibuf; + ReadBuffer[n] = 0; + return ReadBuffer; } else { |