diff --git a/ChangeLog.txt b/ChangeLog.txt index fce287d7c0..4f25295c81 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,12 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2016-01-09 20:15 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * contrib/hbgzio/gzio.c + * do not clear timeout when at least one byte was read or written, + it may be useful for code which was not designed to work with + partially finished file read/write operations. + 2016-01-09 20:09 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * contrib/hbfoxpro/hbfoxpro.hbp * contrib/hbfoxpro/hbfoxpro.hbx diff --git a/contrib/hbgzio/gzio.c b/contrib/hbgzio/gzio.c index ffa32a8d17..39e1e8d31c 100644 --- a/contrib/hbgzio/gzio.c +++ b/contrib/hbgzio/gzio.c @@ -421,7 +421,7 @@ static HB_SIZE s_fileRead( PHB_FILE pFile, void * buffer, HB_SIZE nSize, if( err == Z_BUF_ERROR && pFile->gz.avail_in == 0 ) { nResult = _PHB_FILE->pFuncs->Read( _PHB_FILE, pFile->buffer, - HB_GZIP_BUFSIZE, pFile->gz.total_out == 0 ? nTimeout : 0 ); + HB_GZIP_BUFSIZE, nTimeout ); if( nResult == 0 || nResult == ( HB_SIZE ) - 1 ) break; pFile->gz.next_in = ( Bytef * ) pFile->buffer; @@ -486,7 +486,6 @@ static HB_SIZE s_fileWrite( PHB_FILE pFile, const void * buffer, HB_SIZE nSize, nResult = s_gzip_write( pFile, nTimeout ); if( nResult == 0 || nResult == ( HB_SIZE ) - 1 ) break; - nTimeout = 0; } err = deflate( &pFile->gz, Z_NO_FLUSH ); if( err != Z_OK )