Permalink
Browse files

Fix: Z_STREAM_END handling

  • Loading branch information...
HeikoKoehn committed Apr 24, 2012
1 parent 0e602b6 commit b0d5ab56970153f6ef727cecac0091bc3a1fb3c0
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/ctelnet.cpp
@@ -1318,6 +1318,15 @@ int cTelnet::decompressBuffer( char * dirtyBuffer, int length )
if( zval == Z_STREAM_END )
{
inflateEnd( & mZstream );
std::cout << "recv Z_STREAM_END, ending compression" << std::endl;
this->mNeedDecompression = false;
this->mMCCP_version_1 = false;
this->mMCCP_version_2 = false;
// Reset the option state so we can re-enable compression again in the future
// such as in the case of a copyover -JM
hisOptionState[static_cast<int>(OPT_COMPRESS)] = false;
hisOptionState[static_cast<int>(OPT_COMPRESS2)] = false;
}
else
{

0 comments on commit b0d5ab5

Please sign in to comment.