Pulled in changes

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@684 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
prozacx
2006-03-15 18:23:43 +00:00
parent ebd57d65c7
commit 4f2599e711
2 changed files with 8 additions and 6 deletions
+4 -3
View File
@@ -1285,6 +1285,7 @@ void Csock::UnPauseRead()
{
m_bPauseRead = false;
ResetTimer();
PushBuff( "", 0, true );
}
void Csock::SetTimeout( int iTimeout, u_int iTimeoutType )
@@ -1316,17 +1317,17 @@ bool Csock::CheckTimeout()
return( false );
}
void Csock::PushBuff( const char *data, int len )
void Csock::PushBuff( const char *data, int len, bool bStartAtZero )
{
if ( !m_bEnableReadLine )
return; // If the ReadLine event is disabled, just ditch here
u_int iStartPos = ( m_sbuffer.empty() ? 0 : m_sbuffer.length() - 1 );
u_int iStartPos = ( m_sbuffer.empty() || bStartAtZero ? 0 : m_sbuffer.length() - 1 );
if ( data )
m_sbuffer.append( data, len );
while( true )
while( !m_bPauseRead )
{
CS_STRING::size_type iFind = m_sbuffer.find( "\n", iStartPos );