]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
SSL buffering tweaks. NOTE this is not a complete fix till i say so, don't use this...
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 6 Jul 2007 16:14:24 +0000 (16:14 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 6 Jul 2007 16:14:24 +0000 (16:14 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7427 e03df62e-2008-0410-955e-edbf42e46eb7

src/inspsocket.cpp
src/users.cpp

index 63964c1eaecf1831bcd1a56811a7bbf89b8456f3..f76543562152235cade8d2cce675ca4e2d3e49f6 100644 (file)
@@ -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)
                                {
index bc221b263c76c7ee10d533b555f32c5ce8cf245f..d83788566acac1afb47976d7875f5bbe25830b28 100644 (file)
@@ -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)