mirror of
https://github.com/znc/znc.git
synced 2026-08-06 17:03:14 +02:00
Csocket: Clear the buffer in DisableReadLine()
This clears the internal read buffer in DisableReadLine(). This fixes "accidental bugs" where CHTTPSock does DisableReadLine() and then reads the post data via ReadData(). The problem is when we do DisableReadLine() in ReadLine() and then return from it. All the stuff is still in the read buffer which triggers a MaxBufferReached() call which causes us to drop the connection. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2148 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+4
-1
@@ -2147,7 +2147,10 @@ void Csock::DelCronByAddr( CCron *pcCron )
|
||||
}
|
||||
|
||||
void Csock::EnableReadLine() { m_bEnableReadLine = true; }
|
||||
void Csock::DisableReadLine() { m_bEnableReadLine = false; }
|
||||
void Csock::DisableReadLine() {
|
||||
m_bEnableReadLine = false;
|
||||
m_sbuffer.clear();
|
||||
}
|
||||
|
||||
void Csock::ReachedMaxBuffer()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user