many changes associated will disconnecting the channel but not disconnecting the circuit

This commit is contained in:
Jeff Hill
2004-01-09 00:42:15 +00:00
parent 60dde019c0
commit f04fa5fdf3
62 changed files with 3591 additions and 2586 deletions

View File

@@ -29,44 +29,53 @@ oldSubscription::~oldSubscription ()
{
}
void oldSubscription::ioCancel ()
void oldSubscription::ioCancel ( epicsGuard < epicsMutex > & guard )
{
if ( this->subscribed ) {
this->chan.ioCancel ( this->id );
this->chan.ioCancel ( guard, this->id );
}
}
void oldSubscription::current (
void oldSubscription::current (
epicsGuard < epicsMutex > & guard,
unsigned type, arrayElementCount count, const void * pData )
{
struct event_handler_args args;
args.usr = this->pPrivate;
args.chid = & this->chan;
args.type = static_cast < long > ( type );
args.count = static_cast < long > ( count );
args.status = ECA_NORMAL;
args.dbr = pData;
( *this->pFunc ) ( args );
caEventCallBackFunc * pFuncTmp = this->pFunc;
{
epicsGuardRelease < epicsMutex > unguard ( guard );
( *pFuncTmp ) ( args );
}
}
void oldSubscription::exception (
epicsGuard < epicsMutex > & guard,
int status, const char * /* pContext */,
unsigned type, arrayElementCount count )
{
if ( status == ECA_CHANDESTROY ) {
ca_client_context & cac = this->chan.getClientCtx ();
cac.destroySubscription ( *this );
cac.destroySubscription ( guard, *this );
}
else if ( status != ECA_DISCONN ) {
struct event_handler_args args;
args.usr = this->pPrivate;
args.chid = &this->chan;
args.chid = & this->chan;
args.type = type;
args.count = count;
args.status = status;
args.dbr = 0;
( *this->pFunc ) ( args );
caEventCallBackFunc * pFuncTmp = this->pFunc;
{
epicsGuardRelease < epicsMutex > unguard ( guard );
( *pFuncTmp ) ( args );
}
}
}