fixed the ca client library status
This commit is contained in:
@@ -62,6 +62,8 @@ STATIC epicsEventId workListEvent; /*wakeup event for dbCaTask*/
|
||||
STATIC int removesOutstanding = 0;
|
||||
STATIC int removesOutstandingWarning = 10000;
|
||||
|
||||
struct ca_client_context * dbCaClientContext;
|
||||
|
||||
void dbCaTask(void); /*The Channel Access Task*/
|
||||
extern void dbServiceIOInit();
|
||||
|
||||
@@ -702,6 +704,7 @@ void dbCaTask()
|
||||
taskwdInsert(epicsThreadGetIdSelf(),NULL,NULL);
|
||||
SEVCHK(ca_context_create(ca_enable_preemptive_callback),
|
||||
"dbCaTask calling ca_context_create");
|
||||
dbCaClientContext = ca_current_context ();
|
||||
SEVCHK(ca_add_exception_event(exceptionCallback,NULL),
|
||||
"ca_add_exception_event");
|
||||
/*Dont do anything until iocInit initializes database*/
|
||||
|
||||
@@ -51,6 +51,8 @@ epicsShareFunc long epicsShareAPI dbCaGetPrecision(
|
||||
epicsShareFunc long epicsShareAPI dbCaGetUnits(
|
||||
const struct link *plink,char *units,int unitsSize);
|
||||
|
||||
extern struct ca_client_context * dbCaClientContext;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -146,8 +146,8 @@ done:
|
||||
printf(" nDisconnect %lu nNoWrite %lu\n",nDisconnect,nNoWrite);
|
||||
dbFinishEntry(pdbentry);
|
||||
|
||||
if ( level > 2 ) {
|
||||
ca_client_status ( level - 2 );
|
||||
if ( level > 2 && dbCaClientContext != 0 ) {
|
||||
ca_context_status ( dbCaClientContext, level - 2 );
|
||||
}
|
||||
|
||||
return(0);
|
||||
|
||||
Reference in New Issue
Block a user