provide ca exception handler

This commit is contained in:
Marty Kraimer
1999-11-19 21:53:41 +00:00
parent 2214ccf39c
commit 8faa582734

View File

@@ -411,6 +411,19 @@ int dbCaGetLinkDBFtype(struct link *plink)
}
static void exceptionCallback(struct exception_handler_args args)
{
chid chid = args.chid;
long stat = args.stat; /* Channel access status code*/
const char *channel;
static char *noname = "unknown";
channel = (chid ? ca_name(chid) : noname);
errlogPrintf("dbCa:exceptionCallback stat %s channel %s\n",
ca_message(stat),channel);
}
static void eventCallback(struct event_handler_args arg)
{
caLink *pca = (caLink *)arg.usr;
@@ -594,6 +607,8 @@ void dbCaTask()
int status;
SEVCHK(ca_task_initialize(),NULL);
SEVCHK(ca_add_exception_event(exceptionCallback,NULL),
"ca_add_exception_event");
/*Dont do anything until iocInit initializes database*/
while(!interruptAccept) threadSleep(.1);
/* channel access event loop */