ca: Fix client bug (race condition) in ipAddrToAsciiEngine
This commit is contained in:
@@ -265,12 +265,16 @@ void ipAddrToAsciiEnginePrivate::run ()
|
||||
continue;
|
||||
}
|
||||
|
||||
// fix for lp:1580623
|
||||
// a destructing cac sets pCurrent to NULL, so
|
||||
// make local copy to avoid race when releasing the guard
|
||||
ipAddrToAsciiTransactionPrivate *pCur = this->pCurrent;
|
||||
this->callbackInProgress = true;
|
||||
|
||||
{
|
||||
epicsGuardRelease < epicsMutex > unguard ( guard );
|
||||
// dont call callback with lock applied
|
||||
this->pCurrent->pCB->transactionComplete ( this->nameTmp );
|
||||
pCur->pCB->transactionComplete ( this->nameTmp );
|
||||
}
|
||||
|
||||
this->callbackInProgress = false;
|
||||
|
||||
Reference in New Issue
Block a user