*** db_access.c.orig 2016-05-10 19:02:06.114617433 -0700 --- db_access.c 2016-05-10 19:04:03.027332775 -0700 *************** *** 32,37 **** --- 32,38 ---- #include "dbCommon.h" #include "errMdef.h" #include "recSup.h" + #include "dbLock.h" #include "alarm.h" #define db_accessHFORdb_accessC #include "db_access.h" *************** *** 182,187 **** --- 183,190 ---- * 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,827 **** } break; default: ! return -1; } if (status) return -1; return 0; } --- 823,834 ---- } break; default: ! status = -1; ! break; } + + dbScanUnlock( paddr->precord ); + if (status) return -1; return 0; }