diff --git a/src/ca/caerr.h b/src/ca/caerr.h index 38de01b31..8609f48d9 100644 --- a/src/ca/caerr.h +++ b/src/ca/caerr.h @@ -192,7 +192,7 @@ READONLY char *ca_message_text[] "A monitor by that id cant be found", "Remote channel has new network address", "New or resumed network connection", -"Attempt to import from a task without a CA context failed", +"Specified task isnt a member of a CA context", "Attempt to use defunct CA feature failed", "The supplied string is empty", "Unable to spawn the CA repeater thread- auto reconnect will fail", diff --git a/src/ca/vxWorks_depen.c b/src/ca/vxWorks_depen.c index 31c7165f3..4439ecde0 100644 --- a/src/ca/vxWorks_depen.c +++ b/src/ca/vxWorks_depen.c @@ -29,6 +29,9 @@ * Modification Log: * ----------------- * $Log$ + * Revision 1.23 1996/08/05 19:18:56 jhill + * better msg for lack of fp + * * Revision 1.22 1996/06/19 17:59:31 jhill * many 3.13 beta changes * @@ -669,8 +672,26 @@ int ca_import(int tid) */ int ca_import_cancel(int tid) { - int status; - TVIU *ptviu; + int status; + TVIU *ptviu; + struct ca_static *pcas; + + if (tid == taskIdSelf()) { + pcas = NULL; + } + else { + pcas = ca_static; + } + + /* + * Attempt to attach to the specified context + */ + ca_static = (struct ca_static *) + taskVarGet(tid, (int *)&ca_static); + if (ca_static == (struct ca_static *) ERROR){ + ca_static = pcas; + return ECA_NOCACTX; + } LOCK; ptviu = (TVIU *) ellFirst(&ca_static->ca_taskVarList); @@ -682,16 +703,20 @@ int ca_import_cancel(int tid) } if(!ptviu){ + ca_static = pcas; UNLOCK; return ECA_NOCACTX; } ellDelete(&ca_static->ca_taskVarList, &ptviu->node); + free(ptviu); UNLOCK; status = taskVarDelete(tid, (void *)&ca_static); assert (status == OK); + ca_static = pcas; + return ECA_NORMAL; } diff --git a/src/include/caerr.h b/src/include/caerr.h index 38de01b31..8609f48d9 100644 --- a/src/include/caerr.h +++ b/src/include/caerr.h @@ -192,7 +192,7 @@ READONLY char *ca_message_text[] "A monitor by that id cant be found", "Remote channel has new network address", "New or resumed network connection", -"Attempt to import from a task without a CA context failed", +"Specified task isnt a member of a CA context", "Attempt to use defunct CA feature failed", "The supplied string is empty", "Unable to spawn the CA repeater thread- auto reconnect will fail",