summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/inspsocket.cpp27
-rw-r--r--src/users.cpp3
2 files changed, 8 insertions, 22 deletions
diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp
index 63964c1ea..f76543562 100644
--- a/src/inspsocket.cpp
+++ b/src/inspsocket.cpp
@@ -449,28 +449,11 @@ bool InspSocket::FlushWriteBuffer()
{
try
{
- int result = Instance->Config->GetIOHook(this)->OnRawSocketWrite(this->fd, outbuffer[0].c_str(), outbuffer[0].length());
- if (result > 0)
- {
- if ((unsigned int)result >= outbuffer[0].length())
- {
- outbuffer.pop_front();
- }
- else
- {
- std::string temp = outbuffer[0].substr(result);
- outbuffer[0] = temp;
- errno = EAGAIN;
- }
- }
- else if (((result == -1) && (errno != EAGAIN)) || (result == 0))
- {
- this->OnError(I_ERR_WRITE);
- this->state = I_ERROR;
- this->Instance->SE->DelFd(this);
- this->Close();
- return true;
- }
+ /* XXX: The lack of buffering here is NOT a bug, modules implementing this interface have to
+ * implement their own buffering mechanisms
+ */
+ Instance->Config->GetIOHook(this)->OnRawSocketWrite(this->fd, outbuffer[0].c_str(), outbuffer[0].length());
+ outbuffer.pop_front();
}
catch (CoreException& modexcept)
{
diff --git a/src/users.cpp b/src/users.cpp
index bc221b263..d83788566 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -1375,6 +1375,9 @@ void userrec::Write(std::string text)
{
try
{
+ /* XXX: The lack of buffering here is NOT a bug, modules implementing this interface have to
+ * implement their own buffering mechanisms
+ */
ServerInstance->Config->GetIOHook(this->GetPort())->OnRawSocketWrite(this->fd, text.data(), text.length());
}
catch (CoreException& modexcept)