From 4eafb6fd8e2ca0af37b46df2c7a7b485f1fb9469 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Wed, 26 Apr 2017 15:03:43 -0500 Subject: [PATCH] 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. --- src/std/rec/eventRecord.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/std/rec/eventRecord.c b/src/std/rec/eventRecord.c index 5c4a65743..38a4ad62f 100644 --- a/src/std/rec/eventRecord.c +++ b/src/std/rec/eventRecord.c @@ -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); }