From 30e634b97b40f1c30bce0cd1550f0a348da63114 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Sun, 23 Apr 2017 23:32:15 -0500 Subject: [PATCH] Adjust calcout's handling of undefined links --- src/std/rec/calcoutRecord.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/std/rec/calcoutRecord.c b/src/std/rec/calcoutRecord.c index e1020938e..92a292140 100644 --- a/src/std/rec/calcoutRecord.c +++ b/src/std/rec/calcoutRecord.c @@ -172,10 +172,10 @@ static long init_record(struct dbCommon *pcommon, int pass) recGblInitConstantLink(plink, DBF_DOUBLE, pvalue); } - if (dbLinkIsConstant(plink)) { + if (dbLinkIsConstant(plink) > 0) { *plinkValid = calcoutINAV_CON; } - else if (dbLinkIsVolatile(plink)) { + else if (dbLinkIsVolatile(plink) > 0) { int conn = dbIsLinkConnected(plink); if (conn) @@ -366,10 +366,10 @@ static long special(DBADDR *paddr, int after) if (fieldIndex != calcoutRecordOUT) recGblInitConstantLink(plink, DBF_DOUBLE, pvalue); - if (dbLinkIsConstant(plink)) { + if (dbLinkIsConstant(plink) > 0) { db_post_events(prec, pvalue, DBE_VALUE); *plinkValid = calcoutINAV_CON; - } else if (dbLinkIsVolatile(plink)) { + } else if (dbLinkIsVolatile(plink) > 0) { int conn = dbIsLinkConnected(plink); if (conn)