Fix for CA link disconnect detection
dbCa's doLocked() method must run the callback even when the link is disconnected to allow alarms to be triggered by softDev support. Patch from Sebastian Marsching Also removes testToDo from rec/test/regressTest.c Fixes lp: #1798855
This commit is contained in:
@@ -703,7 +703,12 @@ static long doLocked(struct link *plink, dbLinkUserCallback rtn, void *priv)
|
||||
caLink *pca;
|
||||
long status;
|
||||
|
||||
pcaGetCheck
|
||||
assert(plink);
|
||||
if (plink->type != CA_LINK) return -1;
|
||||
pca = (caLink *)plink->value.pv_link.pvt;
|
||||
assert(pca);
|
||||
epicsMutexMustLock(pca->lock);
|
||||
assert(pca->plink);
|
||||
status = rtn(plink, priv);
|
||||
epicsMutexUnlock(pca->lock);
|
||||
return status;
|
||||
|
||||
@@ -133,10 +133,8 @@ void testCADisconn(void)
|
||||
startRegressTestIoc("badCaLink.db");
|
||||
|
||||
testdbPutFieldOk("ai:disconn.PROC", DBF_LONG, 1);
|
||||
testTodoBegin("lp:1798855");
|
||||
testdbGetFieldEqual("ai:disconn.SEVR", DBF_LONG, INVALID_ALARM);
|
||||
testdbGetFieldEqual("ai:disconn.STAT", DBF_LONG, LINK_ALARM);
|
||||
testTodoEnd();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user