Database HW link parameter string no longer optional in V7

Bug #1790723 reported by Till Straumann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
EPICS Base
Status tracked in 7.0
3.16
Fix Released
Medium
mdavidsaver
7.0
Fix Released
Medium
Andrew Johnson

Bug Description

Until and including 3.15 -- (I didn't look at 3.16) the parameter string '@<parameter>' was an optional part of hardware link fields.

In V7 this no longer seems to be the case

dbStaticLib:2320:

       if (parm && pinfo->ltype != RF_IO) {
            /* move parm string to beginning of buffer */
            memmove(pinfo->target, parm, len + 1);
        } else if (!parm && pinfo->ltype == RF_IO) {
            /* RF_IO, the string isn't needed at all */
            free(pinfo->target);
            pinfo->target = NULL;
        }
        else goto fail;

        return 0;

i.e., RF_IO links must not have a '@<parameter>' part but all other link types do.

Since this has the potential for breaking many existing databases it would seem desirable to de-escalate, e.g:

if ( !parm || pinfo->ltype == RF_IO ) {
  if ( pinfo->target ) {
    free(pinfo->target);
    pinfo->target = NULL;
  }
} else {
  memmove(pinfo->target, parm, len + 1);
}

return 0;

description: updated
Revision history for this message
Andrew Johnson (anj) wrote :

Core Group review at ESS:

Regression, "@" should be optional. MD to resolve whether parm should be NULL or an empty string based on previous behavior.

Revision history for this message
mdavidsaver (mdavidsaver) wrote :

Changed with 7c00cc8045b7684fdc3d6df0e2b24d4e4eb07daf to again allow trailing '@' to be omitted for HW links other than INST_IO. So "#C0 S0" is equivalent to "@C0 S0 @".

Revision history for this message
Ralph Lange (ralph-lange) wrote :

This just hit us in the 4-day CODAC Core training.
Not a single hardware link in the hands-on session was working.
Phew!

Revision history for this message
Ralph Lange (ralph-lange) wrote :

@Michael: this commit is not in the 3.15 branch. Where can I find it?

Revision history for this message
Ralph Lange (ralph-lange) wrote :

Ah, 3.16. Sorry.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.