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.
This commit is contained in:
Przemysław Czerpak
2016-01-09 20:15:54 +01:00
parent 6f3550d8ed
commit cafafa03d8
2 changed files with 7 additions and 2 deletions

View File

@@ -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

View File

@@ -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 )