From e301e1b359c7f4dc1cca28ce30615f89ccff0845 Mon Sep 17 00:00:00 2001 From: "Janet B. Anderson" Date: Wed, 30 Oct 1996 17:44:33 +0000 Subject: [PATCH] In init_record the udf field is set to false only if inp is a constant link and recGblInitConstantLink returns success. In read_ the udf field is set to false only if inp is not a constant link and dbGetLink returns success. --- src/dev/devAiSoft.c | 6 +++--- src/dev/devBiSoft.c | 6 +++--- src/dev/devEventSoft.c | 6 +++--- src/dev/devLiSoft.c | 6 +++--- src/dev/devMbbiDirectSoft.c | 6 +++--- src/dev/devMbbiSoft.c | 6 +++--- src/dev/devSiSoft.c | 8 ++++---- 7 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/dev/devAiSoft.c b/src/dev/devAiSoft.c index e592d3509..706601aab 100644 --- a/src/dev/devAiSoft.c +++ b/src/dev/devAiSoft.c @@ -81,8 +81,8 @@ static long init_record(pai) /* ai.inp must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/ switch (pai->inp.type) { case (CONSTANT) : - recGblInitConstantLink(&pai->inp,DBF_DOUBLE,&pai->val); - pai->udf = FALSE; + if(recGblInitConstantLink(&pai->inp,DBF_DOUBLE,&pai->val)) + pai->udf = FALSE; break; case (PV_LINK) : case (DB_LINK) : @@ -106,7 +106,7 @@ static long read_ai(pai) status = dbGetLink(&(pai->inp),DBR_DOUBLE, &(pai->val),0,0); - if (RTN_SUCCESS(status)) + if (pai->inp.type!=CONSTANT && RTN_SUCCESS(status)) pai->udf = FALSE; return(2); /*don't convert*/ diff --git a/src/dev/devBiSoft.c b/src/dev/devBiSoft.c index afa13c9a3..fe23febdf 100644 --- a/src/dev/devBiSoft.c +++ b/src/dev/devBiSoft.c @@ -78,8 +78,8 @@ static long init_record(pbi) /* bi.inp must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK */ switch (pbi->inp.type) { case (CONSTANT) : - recGblInitConstantLink(&pbi->inp,DBF_ENUM,&pbi->val); - pbi->udf = FALSE; + if(recGblInitConstantLink(&pbi->inp,DBF_ENUM,&pbi->val)) + pbi->udf = FALSE; break; case (DB_LINK) : case (PV_LINK) : @@ -100,7 +100,7 @@ static long read_bi(pbi) status = dbGetLink(&pbi->inp, DBR_USHORT, &pbi->val,0,0); - if(RTN_SUCCESS(status)) pbi->udf=FALSE; + if(pbi->inp.type!=CONSTANT && RTN_SUCCESS(status)) pbi->udf=FALSE; return(2); } diff --git a/src/dev/devEventSoft.c b/src/dev/devEventSoft.c index 6e3243ec7..ed91336af 100644 --- a/src/dev/devEventSoft.c +++ b/src/dev/devEventSoft.c @@ -76,8 +76,8 @@ static long init_record(pevent) /* event.inp must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/ switch (pevent->inp.type) { case (CONSTANT) : - recGblInitConstantLink(&pevent->inp,DBF_USHORT,&pevent->val); - pevent->udf = FALSE; + if(recGblInitConstantLink(&pevent->inp,DBF_USHORT,&pevent->val)) + pevent->udf = FALSE; break; case (PV_LINK) : case (DB_LINK) : @@ -97,6 +97,6 @@ static long read_event(pevent) long status,options=0,nRequest=1; status = dbGetLink(&pevent->inp,DBR_USHORT,&pevent->val,0,0); - if(RTN_SUCCESS(status)) pevent->udf=FALSE; + if(pevent->inp.type!=CONSTANT && RTN_SUCCESS(status)) pevent->udf=FALSE; return(status); } diff --git a/src/dev/devLiSoft.c b/src/dev/devLiSoft.c index 53c789950..66d715276 100644 --- a/src/dev/devLiSoft.c +++ b/src/dev/devLiSoft.c @@ -75,8 +75,8 @@ static long init_record(plongin) /* longin.inp must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/ switch (plongin->inp.type) { case (CONSTANT) : - recGblInitConstantLink(&plongin->inp,DBF_LONG,&plongin->val); - plongin->udf = FALSE; + if(recGblInitConstantLink(&plongin->inp,DBF_LONG,&plongin->val)) + plongin->udf = FALSE; break; case (PV_LINK) : case (DB_LINK) : @@ -96,6 +96,6 @@ static long read_longin(plongin) long status; status = dbGetLink(&plongin->inp,DBR_LONG, &plongin->val,0,0); - if(RTN_SUCCESS(status)) plongin->udf=FALSE; + if(plongin->inp.type!=CONSTANT && RTN_SUCCESS(status)) plongin->udf=FALSE; return(status); } diff --git a/src/dev/devMbbiDirectSoft.c b/src/dev/devMbbiDirectSoft.c index 3139a8f54..f39f903dd 100644 --- a/src/dev/devMbbiDirectSoft.c +++ b/src/dev/devMbbiDirectSoft.c @@ -76,8 +76,8 @@ static long init_record(pmbbi) /* mbbi.inp must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/ switch (pmbbi->inp.type) { case (CONSTANT) : - recGblInitConstantLink(&pmbbi->inp,DBF_ENUM,&pmbbi->val); - pmbbi->udf = FALSE; + if(recGblInitConstantLink(&pmbbi->inp,DBF_ENUM,&pmbbi->val)) + pmbbi->udf = FALSE; break; case (DB_LINK) : case (PV_LINK) : @@ -97,6 +97,6 @@ static long read_mbbi(pmbbi) long status; status = dbGetLink(&pmbbi->inp,DBR_USHORT,&pmbbi->val,0,0); - if (RTN_SUCCESS(status)) pmbbi->udf=FALSE; + if (pmbbi->inp.type!=CONSTANT && RTN_SUCCESS(status)) pmbbi->udf=FALSE; return(2); } diff --git a/src/dev/devMbbiSoft.c b/src/dev/devMbbiSoft.c index eef95ea7c..4ed5beb2a 100644 --- a/src/dev/devMbbiSoft.c +++ b/src/dev/devMbbiSoft.c @@ -77,8 +77,8 @@ static long init_record(pmbbi) long status; if (pmbbi->inp.type == CONSTANT) { - recGblInitConstantLink(&pmbbi->inp,DBF_ENUM,&pmbbi->val); - pmbbi->udf = FALSE; + if(recGblInitConstantLink(&pmbbi->inp,DBF_ENUM,&pmbbi->val)) + pmbbi->udf = FALSE; } return(0); } @@ -89,6 +89,6 @@ static long read_mbbi(pmbbi) long status; status = dbGetLink(&pmbbi->inp,DBR_USHORT,&pmbbi->val,0,0); - if(RTN_SUCCESS(status)) pmbbi->udf=FALSE; + if(pmbbi->inp.type!=CONSTANT && RTN_SUCCESS(status)) pmbbi->udf=FALSE; return(2); } diff --git a/src/dev/devSiSoft.c b/src/dev/devSiSoft.c index a70934e74..781fb67c4 100644 --- a/src/dev/devSiSoft.c +++ b/src/dev/devSiSoft.c @@ -75,9 +75,9 @@ static long init_record(pstringin) /* stringin.inp must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/ switch (pstringin->inp.type) { case (CONSTANT) : - recGblInitConstantLink(&pstringin->inp,DBF_STRING,pstringin->val); - pstringin->udf = FALSE; - break; + if(recGblInitConstantLink(&pstringin->inp,DBF_STRING,pstringin->val)) + pstringin->udf = FALSE; + break; case (PV_LINK) : case (DB_LINK) : case (CA_LINK) : @@ -96,6 +96,6 @@ static long read_stringin(pstringin) long status; status = dbGetLink(&pstringin->inp,DBR_STRING,pstringin->val,0,0); - if(RTN_SUCCESS(status)) pstringin->udf=FALSE; + if(pstringin->inp.type!=CONSTANT && RTN_SUCCESS(status)) pstringin->udf=FALSE; return(status); }