From f20407b08cecc859487ace2d85c5322cd31ff775 Mon Sep 17 00:00:00 2001 From: "Alexander S.Kresin" Date: Fri, 7 Jun 2002 09:49:28 +0000 Subject: [PATCH] 2002-06-07 13:53 UTC+0300 Alexander Kresin --- harbour/ChangeLog | 4 ++++ harbour/source/rdd/dbf1.c | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 6993f1490e..55ce9b6605 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,10 @@ 2002-12-01 23:12 UTC+0100 Foo Bar */ +2002-06-07 13:53 UTC+0300 Alexander Kresin + * source/rdd/dbf1.c + ! Bug fixed in hb_dbfLockRecord(), reported by Richard Chidiak + 2002-06-06 23:21 UTC+0300 Alexander Kresin * contrib/rddads/ads1.c ! Fixed bug, related to creating databases with extended data types diff --git a/harbour/source/rdd/dbf1.c b/harbour/source/rdd/dbf1.c index 05f60b82fd..3aceb57f04 100644 --- a/harbour/source/rdd/dbf1.c +++ b/harbour/source/rdd/dbf1.c @@ -349,6 +349,17 @@ static ERRCODE hb_dbfLockRecord( DBFAREAP pArea, ULONG ulRecNo, BOOL * pResult, if( bExclusive ) hb_dbfUnlockAllRecords( pArea ); + if( pArea->ulNumLocksPos > 0 ) + { + ULONG ul; + for( ul=0; ul< pArea->ulNumLocksPos; ul++ ) + if( pArea->pLocksPos[ ul ] == ulRecNo ) + { + * pResult = TRUE; + return SUCCESS; + } + } + if( hb_fsLock( pArea->hDataFile, DBF_LOCKPOS + ulRecNo, 1, FL_LOCK ) ) { if( pArea->ulNumLocksPos == 0 ) /* Create the list */