diff --git a/src/std/dev/devAiSoftRaw.c b/src/std/dev/devAiSoftRaw.c index e7b767e50..f2cfd5df5 100644 --- a/src/std/dev/devAiSoftRaw.c +++ b/src/std/dev/devAiSoftRaw.c @@ -65,7 +65,7 @@ static long readLocked(struct link *pinp, void *dummy) prec->tse == epicsTimeEventDeviceTime) dbGetTimeStamp(pinp, &prec->time); - return 0; + return status; } static long read_ai(aiRecord *prec) diff --git a/src/std/dev/devBiSoft.c b/src/std/dev/devBiSoft.c index f0f305b8c..12640ad0c 100644 --- a/src/std/dev/devBiSoft.c +++ b/src/std/dev/devBiSoft.c @@ -55,13 +55,15 @@ static long init_record(biRecord *prec) static long readLocked(struct link *pinp, void *dummy) { biRecord *prec = (biRecord *) pinp->precord; + long status = dbGetLink(pinp, DBR_USHORT, &prec->val, 0, 0); + + if (status) return status; + + prec->udf = FALSE; + if (dbLinkIsConstant(&prec->tsel) && + prec->tse == epicsTimeEventDeviceTime) + dbGetTimeStamp(pinp, &prec->time); - if (!dbGetLink(pinp, DBR_USHORT, &prec->val, 0, 0)) { - prec->udf = FALSE; - if (dbLinkIsConstant(&prec->tsel) && - prec->tse == epicsTimeEventDeviceTime) - dbGetTimeStamp(pinp, &prec->time); - } return 2; } diff --git a/src/std/dev/devBiSoftRaw.c b/src/std/dev/devBiSoftRaw.c index 3cb6b6ffe..a71bf89cb 100644 --- a/src/std/dev/devBiSoftRaw.c +++ b/src/std/dev/devBiSoftRaw.c @@ -48,19 +48,22 @@ epicsExportAddress(dset, devBiSoftRaw); static long init_record(biRecord *prec) { recGblInitConstantLink(&prec->inp, DBF_ULONG, &prec->rval); + return 0; } static long readLocked(struct link *pinp, void *dummy) { biRecord *prec = (biRecord *) pinp->precord; + long status = dbGetLink(pinp, DBR_ULONG, &prec->rval, 0, 0); - if (!dbGetLink(pinp, DBR_ULONG, &prec->rval, 0, 0) && - dbLinkIsConstant(&prec->tsel) && + if (status) return status; + + if (dbLinkIsConstant(&prec->tsel) && prec->tse == epicsTimeEventDeviceTime) dbGetTimeStamp(pinp, &prec->time); - return 0; + return status; } static long read_bi(biRecord *prec) diff --git a/src/std/dev/devLiSoft.c b/src/std/dev/devLiSoft.c index 30f981b59..6d7b7fda1 100644 --- a/src/std/dev/devLiSoft.c +++ b/src/std/dev/devLiSoft.c @@ -58,10 +58,12 @@ static long readLocked(struct link *pinp, void *dummy) longinRecord *prec = (longinRecord *) pinp->precord; long status = dbGetLink(pinp, DBR_LONG, &prec->val, 0, 0); - if (!status && - dbLinkIsConstant(&prec->tsel) && + if (status) return status; + + if (dbLinkIsConstant(&prec->tsel) && prec->tse == epicsTimeEventDeviceTime) dbGetTimeStamp(pinp, &prec->time); + return status; } diff --git a/src/std/dev/devLsiSoft.c b/src/std/dev/devLsiSoft.c index 8ec5ea2fa..3076c9900 100644 --- a/src/std/dev/devLsiSoft.c +++ b/src/std/dev/devLsiSoft.c @@ -29,8 +29,9 @@ static long readLocked(struct link *pinp, void *dummy) lsiRecord *prec = (lsiRecord *) pinp->precord; long status = dbGetLinkLS(pinp, prec->val, prec->sizv, &prec->len); - if (!status && - dbLinkIsConstant(&prec->tsel) && + if (status) return status; + + if (dbLinkIsConstant(&prec->tsel) && prec->tse == epicsTimeEventDeviceTime) dbGetTimeStamp(pinp, &prec->time); diff --git a/src/std/dev/devMbbiDirectSoft.c b/src/std/dev/devMbbiDirectSoft.c index c63d0de1a..9c929b2b6 100644 --- a/src/std/dev/devMbbiDirectSoft.c +++ b/src/std/dev/devMbbiDirectSoft.c @@ -56,13 +56,15 @@ static long init_record(mbbiDirectRecord *prec) static long readLocked(struct link *pinp, void *dummy) { mbbiDirectRecord *prec = (mbbiDirectRecord *) pinp->precord; + long status = dbGetLink(pinp, DBR_USHORT, &prec->val, 0, 0); + + if (status) return status; + + prec->udf = FALSE; + if (dbLinkIsConstant(&prec->tsel) && + prec->tse == epicsTimeEventDeviceTime) + dbGetTimeStamp(pinp, &prec->time); - if (!dbGetLink(pinp, DBR_USHORT, &prec->val, 0, 0)) { - prec->udf = FALSE; - if (dbLinkIsConstant(&prec->tsel) && - prec->tse == epicsTimeEventDeviceTime) - dbGetTimeStamp(pinp, &prec->time); - } return 2; } diff --git a/src/std/dev/devMbbiSoft.c b/src/std/dev/devMbbiSoft.c index 670e2f615..b0b57144f 100644 --- a/src/std/dev/devMbbiSoft.c +++ b/src/std/dev/devMbbiSoft.c @@ -56,14 +56,15 @@ static long init_record(mbbiRecord *prec) static long readLocked(struct link *pinp, void *dummy) { mbbiRecord *prec = (mbbiRecord *) pinp->precord; + long status = dbGetLink(pinp, DBR_USHORT, &prec->val, 0, 0); - if (!dbGetLink(pinp, DBR_USHORT, &prec->val, 0, 0)) { - prec->udf = FALSE; + if (status) return status; + + prec->udf = FALSE; + if (dbLinkIsConstant(&prec->tsel) && + prec->tse == epicsTimeEventDeviceTime) + dbGetTimeStamp(pinp, &prec->time); - if (dbLinkIsConstant(&prec->tsel) && - prec->tse == epicsTimeEventDeviceTime) - dbGetTimeStamp(pinp, &prec->time); - } return 2; }