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:
Andrew Johnson committed 2018-12-05 00:59:36 -06:00
1 parent 9e999d2bef
commit aab5693b45
2 files changed
+6 -3

No files matched your search

+6 -1
View File
@@ -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;
-2
View File
@@ -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();
}