In init_record the udf field is set to false only if svl is a
constant link and recGblInitConstantLink returns success.
This commit is contained in:
@@ -80,8 +80,8 @@ static long init_record(phistogram)
|
||||
/* histogram.svl must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/
|
||||
switch (phistogram->svl.type) {
|
||||
case (CONSTANT) :
|
||||
recGblInitConstantLink(&phistogram->svl,DBF_DOUBLE,&phistogram->sgnl);
|
||||
phistogram->udf = FALSE;
|
||||
if(recGblInitConstantLink(&phistogram->svl,DBF_DOUBLE,&phistogram->sgnl))
|
||||
phistogram->udf = FALSE;
|
||||
break;
|
||||
case (PV_LINK) :
|
||||
case (DB_LINK) :
|
||||
|
||||
@@ -107,7 +107,8 @@ static long init_record(phistogram)
|
||||
callbackSetCallback(myCallback,&pcallback->callback);
|
||||
pcallback->precord = (struct dbCommon *)phistogram;
|
||||
pcallback->wd_id = wdCreate();
|
||||
recGblInitConstantLink(&phistogram->svl,DBF_DOUBLE,&phistogram->sgnl);
|
||||
if(recGblInitConstantLink(&phistogram->svl,DBF_DOUBLE,&phistogram->sgnl))
|
||||
phistogram->udf = FALSE;
|
||||
break;
|
||||
default :
|
||||
recGblRecordError(S_db_badField,(void *)phistogram,
|
||||
|
||||
Reference in New Issue
Block a user