calc and calcout record get_precision bug

Reported by Stephanie Allison on 2010-11-23
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
EPICS Base
Undecided
Unassigned

Bug Description

Precision is not properly initialized before calling recGblGetPrec in the calc and calcout records. Also, I found some channel access calls don't get the proper precision unless the FieldIndex is used to determine if the PV is VAL or not. Please change get_precision to be as follows (which is consistent with subRecord):

static long get_precision(DBADDR *paddr, long *pprecision)
{
    calcRecord *prec = (calcRecord *)paddr->precord;
    int fieldIndex = dbGetFieldIndex(paddr);

    *pprecision = prec->prec;
    if (fieldIndex != calcRecordVAL)
        recGblGetPrec(paddr, pprecision);

    return 0;
}

Related branches

Andrew Johnson (anj) wrote :

Fixed in R3.14.12 (just!). Thanks!

Changed in epics-base:
status: New → Fix Committed

That was fast! Thank you and have a very nice Thanksgiving,

Stephanie

> -----Original Message-----
> From: <email address hidden> [mailto:<email address hidden>] On Behalf Of Andrew
> Johnson
> Sent: Wednesday, November 24, 2010 11:55 AM
> To: Allison, Stephanie
> Subject: [Bug 680702] Re: calc and calcout record get_precision bug
>
> Fixed in R3.14.12 (just!). Thanks!
>
> ** Changed in: epics-base
> Status: New => Fix Committed
>
> --
> calc and calcout record get_precision bug
> https://bugs.launchpad.net/bugs/680702
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in EPICS Base: Fix Committed
>
> Bug description:
> Precision is not properly initialized before calling recGblGetPrec in the calc and calcout
> records. Also, I found some channel access calls don't get the proper precision unless the
> FieldIndex is used to determine if the PV is VAL or not. Please change get_precision to be
> as follows (which is consistent with subRecord):
>
> static long get_precision(DBADDR *paddr, long *pprecision)
> {
> calcRecord *prec = (calcRecord *)paddr->precord;
> int fieldIndex = dbGetFieldIndex(paddr);
>
> *pprecision = prec->prec;
> if (fieldIndex != calcRecordVAL)
> recGblGetPrec(paddr, pprecision);
>
> return 0;
> }
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/epics-base/+bug/680702/+subscribe

Andrew Johnson (anj) on 2010-11-24
Changed in epics-base:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers