fix aSub with constant input links
This commit is contained in:
@@ -275,8 +275,11 @@ static long fetch_values(aSubRecord *prec)
|
||||
|
||||
/* Get the input link values */
|
||||
for (i = 0; i < NUM_ARGS; i++) {
|
||||
DBLINK *plink = &(&prec->inpa)[i];
|
||||
long nRequest = (&prec->noa)[i];
|
||||
status = dbGetLink(&(&prec->inpa)[i], (&prec->fta)[i], (&prec->a)[i], 0,
|
||||
if(dbLinkIsConstant(plink))
|
||||
continue;
|
||||
status = dbGetLink(plink, (&prec->fta)[i], (&prec->a)[i], 0,
|
||||
&nRequest);
|
||||
if (status)
|
||||
return status;
|
||||
|
||||
@@ -76,6 +76,8 @@ void testArrayLength1(void)
|
||||
|
||||
/*
|
||||
* https://bugs.launchpad.net/epics-base/+bug/1699445 and 1887981
|
||||
*
|
||||
* also https://github.com/epics-base/epics-base/issues/284
|
||||
*/
|
||||
static
|
||||
void testHexConstantLinks(void)
|
||||
@@ -94,6 +96,22 @@ void testHexConstantLinks(void)
|
||||
testdbGetFieldEqual("as1.G", DBR_LONG, 0x10);
|
||||
testdbGetFieldEqual("as1.H", DBR_LONG, 0x10);
|
||||
|
||||
testdbPutFieldOk("ai1.PROC", DBR_LONG, 1);
|
||||
testdbPutFieldOk("li1.PROC", DBR_LONG, 1);
|
||||
testdbPutFieldOk("as1.PROC", DBR_LONG, 1);
|
||||
|
||||
testdbGetFieldEqual("ai1", DBR_LONG, 0x10);
|
||||
testdbGetFieldEqual("li1", DBR_LONG, 0x10);
|
||||
testdbGetFieldEqual("mi1", DBR_LONG, 0x10);
|
||||
testdbGetFieldEqual("as1.A", DBR_LONG, 0x10);
|
||||
testdbGetFieldEqual("as1.B", DBR_LONG, 0x10);
|
||||
testdbGetFieldEqual("as1.C", DBR_LONG, 0x10);
|
||||
testdbGetFieldEqual("as1.D", DBR_LONG, 0x10);
|
||||
testdbGetFieldEqual("as1.E", DBR_LONG, 0x10);
|
||||
testdbGetFieldEqual("as1.F", DBR_LONG, 0x10);
|
||||
testdbGetFieldEqual("as1.G", DBR_LONG, 0x10);
|
||||
testdbGetFieldEqual("as1.H", DBR_LONG, 0x10);
|
||||
|
||||
testIocShutdownOk();
|
||||
testdbCleanup();
|
||||
}
|
||||
@@ -210,7 +228,7 @@ void testLinkSevr(void)
|
||||
|
||||
MAIN(regressTest)
|
||||
{
|
||||
testPlan(54);
|
||||
testPlan(68);
|
||||
testArrayLength1();
|
||||
testHexConstantLinks();
|
||||
testLinkMS();
|
||||
|
||||
Reference in New Issue
Block a user