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:
psychon
2010-09-27 18:51:55 +00:00
parent 768093b792
commit 2809dd1108
+4 -1
View File
@@ -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()
{