Fix bug in eventRecord::init_record

Look up event handle /after/ the device init routine has been run,
in case it modified the event name in VAL. That didn't used to
be possible because constant links couldn't return strings.
This commit is contained in:
Andrew Johnson
2017-04-26 15:03:43 -05:00
parent 33f3145fcc
commit 4eafb6fd8e

View File

@@ -102,10 +102,11 @@ static long init_record(struct dbCommon *pcommon, int pass)
recGblInitConstantLink(&prec->siml, DBF_USHORT, &prec->simm);
recGblInitConstantLink(&prec->siol, DBF_STRING, &prec->sval);
prec->epvt = eventNameToHandle(prec->val);
if( (pdset=(struct eventdset *)(prec->dset)) && (pdset->init_record) )
status=(*pdset->init_record)(prec);
prec->epvt = eventNameToHandle(prec->val);
return(status);
}