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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user