destroy getCallback prior to calling callback in case they delete the

channel in the callback
This commit is contained in:
Jeff Hill
2009-08-13 22:43:21 +00:00
parent 59b820d2f5
commit 2df7da052a

View File

@@ -77,12 +77,17 @@ void getCallback::exception (
args.status = status;
args.dbr = 0;
caEventCallBackFunc * pFuncTmp = this->pFunc;
// fetch client context and destroy prior to releasing
// the lock and calling cb in case they destroy channel there
this->chan.getClientCtx().destroyGetCallback ( guard, *this );
{
epicsGuardRelease < epicsMutex > unguard ( guard );
( *pFuncTmp ) ( args );
}
}
this->chan.getClientCtx().destroyGetCallback ( guard, *this );
else {
this->chan.getClientCtx().destroyGetCallback ( guard, *this );
}
}
void * getCallback::operator new ( size_t ) // X aCC 361