2002-09-05 18:46 UTC-0300 Horacio Roldan <harbour_ar@yahoo.com.ar>

* source/rdd/dbf1.c
     synched with
       2002-08-31 20:38 UTC-0800 Ron Pinkas <ron@ronpinkas.com>
         * source/rdd/dbf1.c
           ! Fixed hb_dbfLockFile() to release record locks before
             attempting to lock the file.
       2002-08-31 15:24 UTC-0800 Ron Pinkas <ron@ronpinkas.com>
         * source/rdd/dbf1.c
           ! Fixed hb_dbfLockRecord() to return success when area
             alread has file lock.
This commit is contained in:
Horacio Dario Roldan Kasimatis
2002-09-05 21:53:08 +00:00
parent 57abcec19d
commit 73503527ac

View File

@@ -352,6 +352,12 @@ static ERRCODE hb_dbfLockRecord( DBFAREAP pArea, ULONG ulRecNo, BOOL * pResult,
if( pArea->lpdbPendingRel )
SELF_FORCEREL( ( AREAP ) pArea );
if( pArea->fFLocked )
{
* pResult = TRUE;
return SUCCESS;
}
if( bExclusive )
hb_dbfUnlockAllRecords( pArea );
@@ -406,6 +412,8 @@ static ERRCODE hb_dbfLockFile( DBFAREAP pArea, BOOL * pResult )
if( pArea->lpdbPendingRel )
SELF_FORCEREL( ( AREAP ) pArea );
hb_dbfUnlockAllRecords( pArea );
pArea->fFLocked = hb_fsLock( pArea->hDataFile, DBF_LOCKPOS + 1,
DBF_LOCKPOS, FL_LOCK );
* pResult = pArea->fFLocked;