In init_record the udf field is set to false only if inp
is a constant link and recGblInitConstantLink returns success. In read_<record type> the udf field is set to false only if inp is not a constant link and dbGetLink returns success.
This commit is contained in:
+3
-3
@@ -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*/
|
||||
|
||||
+3
-3
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
+3
-3
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
+4
-4
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user