db: Allow link fields to return a DOUBLE value
A dbCa link does a ca_get with type DBR_CTRL_DOUBLE to populate its list of attribute values immediately after connecting. If the target is a DBF_*LINK field it used to return an error, preventing the link from properly connecting. This change makes dbGetField() return a single NAN value instead of rejecting the request. Fixes: lp:545358
This commit is contained in:
@@ -969,6 +969,11 @@ long epicsShareAPI dbGetField(DBADDR *paddr,short dbrType,
|
||||
if (nRequest && *nRequest > 1) *nRequest = 1;
|
||||
break;
|
||||
|
||||
case DBR_DOUBLE: /* Needed for dbCa links */
|
||||
if (nRequest && *nRequest) *nRequest = 1;
|
||||
*(double *)pbuffer = epicsNAN;
|
||||
goto done;
|
||||
|
||||
case DBR_CHAR:
|
||||
case DBR_UCHAR:
|
||||
if (nRequest && *nRequest > 0) {
|
||||
|
||||
Reference in New Issue
Block a user