From dc31948da11fabcd53b580a96058e7775d11355d Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Thu, 20 May 2004 21:58:41 +0000 Subject: [PATCH] fixed channel delete in get callback handler bug discovered by regression tests --- src/ca/getCallback.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ca/getCallback.cpp b/src/ca/getCallback.cpp index 2c0c8a101..567e48482 100644 --- a/src/ca/getCallback.cpp +++ b/src/ca/getCallback.cpp @@ -53,11 +53,13 @@ void getCallback::completion ( args.status = ECA_NORMAL; args.dbr = pData; 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 ); } void getCallback::exception (