=== modified file 'src/db/db_access.c' --- src/db/db_access.c 2010-10-27 18:26:56 +0000 +++ src/db/db_access.c 2016-05-13 18:40:37 +0000 @@ -40,6 +40,7 @@ #include "dbNotify.h" #include "dbAccessDefs.h" #include "dbEvent.h" +#include "dbLock.h" #include "db_access_routines.h" #ifndef NULL @@ -182,6 +183,8 @@ * in the dbAccess.c dbGet() and getOptions() routines. */ + dbScanLock(paddr->precord); + switch(buffer_type) { case(oldDBR_STRING): status = dbGetField(paddr, DBR_STRING, pbuffer, &zero, nRequest, pfl); @@ -820,8 +823,12 @@ } break; default: - return -1; + status = -1; + break; } + + dbScanUnlock(paddr->precord); + if (status) return -1; return 0; }