diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 6fd11c3f07..3f358425cb 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,7 @@ +2001-06-09 23:15 GMT-3 Horacio Roldan + *source/rdd/dbf1.c + ! fixed message sending that corrupted dbf (with ftp) header + 2001-06-09 22:05 GMT+7 Andi Jahja * harbour/source/compiler/hbusage.c - Deleting my own name in "Credit", I do not deserve it! diff --git a/harbour/source/rdd/dbf1.c b/harbour/source/rdd/dbf1.c index d07086db85..37af24eb81 100644 --- a/harbour/source/rdd/dbf1.c +++ b/harbour/source/rdd/dbf1.c @@ -870,11 +870,13 @@ ERRCODE hb_dbfAppend( DBFAREAP pArea, BOOL bUnLockAll ) if( pArea->fShared ) { hb_dbfWriteRecord( pArea ); - hb_dbfWriteDBHeader( pArea ); + //hb_dbfWriteDBHeader( pArea ); + SELF_WRITEDBHEADER( ( AREAP ) pArea ); } else { - hb_dbfWriteDBHeader( pArea ); + //hb_dbfWriteDBHeader( pArea ); + SELF_WRITEDBHEADER( ( AREAP ) pArea ); pArea->fUpdateHeader = TRUE; /* To truncate the file later */ } return SUCCESS; @@ -947,7 +949,8 @@ ERRCODE hb_dbfFlush( DBFAREAP pArea ) hb_fsWrite( pArea->hDataFile, ( BYTE * ) "\032", 1 ); hb_fsWrite( pArea->hDataFile, NULL, 0 ); } - hb_dbfWriteDBHeader( pArea ); + //hb_dbfWriteDBHeader( pArea ); + SELF_WRITEDBHEADER( ( AREAP ) pArea ); } hb_fsCommit( pArea->hDataFile ); @@ -1086,7 +1089,8 @@ ERRCODE hb_dbfGoCold( DBFAREAP pArea ) /* Update header */ if( pArea->fShared ) - hb_dbfWriteDBHeader( pArea ); + SELF_WRITEDBHEADER( ( AREAP ) pArea ); + //hb_dbfWriteDBHeader( pArea ); pArea->fAppend = FALSE; } @@ -1373,7 +1377,8 @@ ERRCODE hb_dbfClose( DBFAREAP pArea ) if( pArea->fShared ) pArea->ulRecCount = hb_dbfCalcRecCount( pArea ); - hb_dbfWriteDBHeader( pArea ); + //hb_dbfWriteDBHeader( pArea ); + SELF_WRITEDBHEADER( ( AREAP ) pArea ); /* Seek to logical eof and write eof mark */ hb_fsSeek( pArea->hDataFile, pArea->uiHeaderLen + @@ -2518,4 +2523,4 @@ HB_FUNC( DBF_GETFUNCTABLE ) hb_retni( hb_rddInherit( pTable, &dbfTable, &dbfSuper, 0 ) ); else hb_retni( FAILURE ); -} +} \ No newline at end of file