bugfix: devEventSoft read_event with constant input and tse = epicsTimeEventDeviceTime did not read timestamp

This commit is contained in:
Dirk Zimoch
2010-10-27 22:19:33 +02:00
parent 0d8725857b
commit 7e7d04576b

View File

@@ -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;
}