X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Finspsocket.cpp;h=c096d9076faf2ab26eb07dc94c017e39079909e1;hb=4ca5fb1994541181f940a692bce47eb11d681e7a;hp=e70b7647b6da46507953d537a93f9378fcb13190;hpb=b928a79eebfc9d87d84886185aba4a75705e221a;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp index e70b7647b..c096d9076 100644 --- a/src/inspsocket.cpp +++ b/src/inspsocket.cpp @@ -11,7 +11,7 @@ * --------------------------------------------------- */ -/* $Core: libIRCDinspsocket */ +/* $Core */ #include "socket.h" #include "inspstring.h" @@ -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, Instance->Config->NetBufferSize, 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, Instance->Config->NetBufferSize, 0); } /* @@ -428,8 +429,8 @@ const char* BufferedSocket::Read() */ if (n > 0) { - ibuf[n] = 0; - return ibuf; + ReadBuffer[n] = 0; + return ReadBuffer; } else {