From 7e7d04576be39fa9ae2d5c4b893ff3f190910ba5 Mon Sep 17 00:00:00 2001 From: Dirk Zimoch Date: Wed, 27 Oct 2010 22:19:33 +0200 Subject: [PATCH] bugfix: devEventSoft read_event with constant input and tse = epicsTimeEventDeviceTime did not read timestamp --- src/dev/softDev/devEventSoft.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/dev/softDev/devEventSoft.c b/src/dev/softDev/devEventSoft.c index bde80a452..71b00587b 100644 --- a/src/dev/softDev/devEventSoft.c +++ b/src/dev/softDev/devEventSoft.c @@ -71,17 +71,18 @@ static long read_event(eventRecord *prec) long status; char newEvent[MAX_STRING_SIZE]; - if (prec->inp.type == CONSTANT) return 0; - status = dbGetLinkValue(&prec->inp, DBR_STRING, newEvent, 0, 0); - if (!status) { + if (prec->inp.type != CONSTANT) + { + status = dbGetLinkValue(&prec->inp, DBR_STRING, newEvent, 0, 0); + if (status) return status; if (strcmp(newEvent, prec->val) != 0) { strcpy(prec->val, newEvent); prec->epvt = eventNameToHandle(prec->val); } - prec->udf = FALSE; - if (prec->tsel.type == CONSTANT && - prec->tse == epicsTimeEventDeviceTime) - dbGetTimeStamp(&prec->inp, &prec->time); } - return status; + prec->udf = FALSE; + if (prec->tsel.type == CONSTANT && + prec->tse == epicsTimeEventDeviceTime) + dbGetTimeStamp(&prec->inp, &prec->time); + return 0; }